From 0ce392ea064e76ec66a3d15d1eb12b6f3a8f2583 Mon Sep 17 00:00:00 2001 From: Majid Rezaei Date: Wed, 25 Sep 2024 06:02:17 -0400 Subject: [PATCH] fix: change building names in ep_multiple_buildings.py to upper case --- hub/imports/results/ep_multiple_buildings.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hub/imports/results/ep_multiple_buildings.py b/hub/imports/results/ep_multiple_buildings.py index bd9a2dd3..71d62763 100644 --- a/hub/imports/results/ep_multiple_buildings.py +++ b/hub/imports/results/ep_multiple_buildings.py @@ -24,7 +24,7 @@ class EnergyPlusMultipleBuildings: csv_output = list(csv.DictReader(csv_file)) for building in self._city.buildings: - building_name = building.name + building_name = building.name.upper() buildings_energy_demands[f'Building {building_name} Heating Demand (J)'] = [ float( row[f"{building_name} IDEAL LOADS AIR SYSTEM:Zone Ideal Loads Supply Air Total Heating Energy [J](Hourly)"]) @@ -36,7 +36,7 @@ class EnergyPlusMultipleBuildings: for row in csv_output ] buildings_energy_demands[f'Building {building_name} DHW Demand (W)'] = [ - float(row[f"DHW {building.name}:Water Use Equipment Heating Rate [W](Hourly)"]) + float(row[f"DHW {building_name}:Water Use Equipment Heating Rate [W](Hourly)"]) for row in csv_output ] buildings_energy_demands[f'Building {building_name} Appliances (W)'] = [ @@ -58,14 +58,15 @@ class EnergyPlusMultipleBuildings: if energy_plus_output_file_path.is_file(): building_energy_demands = self._building_energy_demands(energy_plus_output_file_path) for building in self._city.buildings: - building.heating_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} Heating Demand (J)'] - building.cooling_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} Cooling Demand (J)'] + building_name = building.name.upper() + building.heating_demand[cte.HOUR] = building_energy_demands[f'Building {building_name} Heating Demand (J)'] + building.cooling_demand[cte.HOUR] = building_energy_demands[f'Building {building_name} Cooling Demand (J)'] building.domestic_hot_water_heat_demand[cte.HOUR] = \ - [x * cte.WATTS_HOUR_TO_JULES for x in building_energy_demands[f'Building {building.name} DHW Demand (W)']] + [x * cte.WATTS_HOUR_TO_JULES for x in building_energy_demands[f'Building {building_name} DHW Demand (W)']] building.appliances_electrical_demand[cte.HOUR] = \ - [x * cte.WATTS_HOUR_TO_JULES for x in building_energy_demands[f'Building {building.name} Appliances (W)']] + [x * cte.WATTS_HOUR_TO_JULES for x in building_energy_demands[f'Building {building_name} Appliances (W)']] building.lighting_electrical_demand[cte.HOUR] = \ - [x * cte.WATTS_HOUR_TO_JULES for x in building_energy_demands[f'Building {building.name} Lighting (W)']] + [x * cte.WATTS_HOUR_TO_JULES for x in building_energy_demands[f'Building {building_name} Lighting (W)']] building.heating_demand[cte.MONTH] = MonthlyValues.get_total_month(building.heating_demand[cte.HOUR]) building.cooling_demand[cte.MONTH] = MonthlyValues.get_total_month(building.cooling_demand[cte.HOUR]) building.domestic_hot_water_heat_demand[cte.MONTH] = (