Merge pull request 'fix: change building names in ep_multiple_buildings.py to upper case' (#66) from fix/ep-result-factory-naming-bug into main
Reviewed-on: CERC/hub#66
This commit is contained in:
commit
70dd9f7c6a
|
@ -24,7 +24,7 @@ class EnergyPlusMultipleBuildings:
|
||||||
csv_output = list(csv.DictReader(csv_file))
|
csv_output = list(csv.DictReader(csv_file))
|
||||||
|
|
||||||
for building in self._city.buildings:
|
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)'] = [
|
buildings_energy_demands[f'Building {building_name} Heating Demand (J)'] = [
|
||||||
float(
|
float(
|
||||||
row[f"{building_name} IDEAL LOADS AIR SYSTEM:Zone Ideal Loads Supply Air Total Heating Energy [J](Hourly)"])
|
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
|
for row in csv_output
|
||||||
]
|
]
|
||||||
buildings_energy_demands[f'Building {building_name} DHW Demand (W)'] = [
|
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
|
for row in csv_output
|
||||||
]
|
]
|
||||||
buildings_energy_demands[f'Building {building_name} Appliances (W)'] = [
|
buildings_energy_demands[f'Building {building_name} Appliances (W)'] = [
|
||||||
|
@ -58,14 +58,15 @@ class EnergyPlusMultipleBuildings:
|
||||||
if energy_plus_output_file_path.is_file():
|
if energy_plus_output_file_path.is_file():
|
||||||
building_energy_demands = self._building_energy_demands(energy_plus_output_file_path)
|
building_energy_demands = self._building_energy_demands(energy_plus_output_file_path)
|
||||||
for building in self._city.buildings:
|
for building in self._city.buildings:
|
||||||
building.heating_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} Heating Demand (J)']
|
building_name = building.name.upper()
|
||||||
building.cooling_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} Cooling Demand (J)']
|
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] = \
|
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] = \
|
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] = \
|
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.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.cooling_demand[cte.MONTH] = MonthlyValues.get_total_month(building.cooling_demand[cte.HOUR])
|
||||||
building.domestic_hot_water_heat_demand[cte.MONTH] = (
|
building.domestic_hot_water_heat_demand[cte.MONTH] = (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user