From 8dd6d4c2352d5bd305c87da7232ad01d8e901702 Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Mon, 29 May 2023 15:10:15 -0400 Subject: [PATCH] working project with all results --- energy_systems_sizing.py | 5 +++-- main.py | 2 +- results.py | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/energy_systems_sizing.py b/energy_systems_sizing.py index aec22b5..8cea231 100644 --- a/energy_systems_sizing.py +++ b/energy_systems_sizing.py @@ -43,10 +43,11 @@ class EnergySystemsSizing: _building_generation_system = GenerationSystem() _building_generation_system.generic_generation_system = \ copy.deepcopy(_generic_building_energy_system.generation_system) + if cte.HEATING in _building_energy_equipment.demand_types: - _building_generation_system.heat_power = building.heating_peak_load[cte.YEAR]['heating peak loads'][0] + _building_generation_system.heat_power = building.heating_peak_load[cte.YEAR][cte.HEATING_PEAK_LOAD][0] if cte.COOLING in _building_energy_equipment.demand_types: - _building_generation_system.cooling_power = building.cooling_peak_load[cte.YEAR]['cooling peak loads'][0] + _building_generation_system.cooling_power = building.cooling_peak_load[cte.YEAR][cte.COOLING_PEAK_LOAD][0] _building_energy_equipment.generation_system = _building_generation_system _building_energy_equipment.distribution_system = _building_distribution_system _building_energy_equipment.emission_system = _building_emission_system diff --git a/main.py b/main.py index 3dfbc00..c56dc04 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,7 @@ from energy_systems_sizing import EnergySystemsSizing try: - file_path = (Path(__file__).parent / 'input_files' / 'selected_building_1517.geojson') + file_path = (Path(__file__).parent / 'input_files' / 'selected_building.geojson') climate_reference_city = 'Montreal' weather_file = 'CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw' weather_format = 'epw' diff --git a/results.py b/results.py index d4b65b2..7f90eb8 100644 --- a/results.py +++ b/results.py @@ -94,9 +94,9 @@ class Results: monthly_electricity_peak = [0.9 * peak_lighting + 0.7 * peak_appliances]*12 conditioning_peak = [] - for i, value in enumerate(building.heating_peak_load[cte.MONTH]['heating peak loads']): - if cooling * building.cooling_peak_load[cte.MONTH]['cooling peak loads'][i] > heating * value: - conditioning_peak.append(cooling * building.cooling_peak_load[cte.MONTH]['cooling peak loads'][i]) + for i, value in enumerate(building.heating_peak_load[cte.MONTH][cte.HEATING_PEAK_LOAD]): + if cooling * building.cooling_peak_load[cte.MONTH][cte.COOLING_PEAK_LOAD][i] > heating * value: + conditioning_peak.append(cooling * building.cooling_peak_load[cte.MONTH][cte.COOLING_PEAK_LOAD][i]) else: conditioning_peak.append(heating * value) monthly_electricity_peak[i] += 0.8 * conditioning_peak[i]