diff --git a/hub/imports/results/ep_multiple_buildings.py b/hub/imports/results/ep_multiple_buildings.py index 73d3599f..9da12c7a 100644 --- a/hub/imports/results/ep_multiple_buildings.py +++ b/hub/imports/results/ep_multiple_buildings.py @@ -62,4 +62,18 @@ class EnergyPlusMultipleBuildings: building.cooling_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} Cooling Demand (J)'] building.domestic_hot_water_heat_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} DHW Demand (W)'] building.appliances_electrical_demand[cte.HOUR] = building_energy_demands[f'Building {building.name} Appliances (W)'] + building.lighting_electrical_demand[cte.HOUR] = 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] = ( + MonthlyValues.get_total_month(building.domestic_hot_water_heat_demand[cte.HOUR])) + building.appliances_electrical_demand[cte.MONTH] = ( + MonthlyValues.get_total_month(building.appliances_electrical_demand[cte.HOUR])) + building.lighting_electrical_demand[cte.MONTH] = ( + MonthlyValues.get_total_month(building.lighting_electrical_demand[cte.HOUR])) + building.heating_demand[cte.YEAR] = [sum(building.heating_demand[cte.MONTH])] + building.cooling_demand[cte.YEAR] = [sum(building.cooling_demand[cte.MONTH])] + building.domestic_hot_water_heat_demand[cte.YEAR] = [sum(building.domestic_hot_water_heat_demand[cte.MONTH])] + building.appliances_electrical_demand[cte.YEAR] = [sum(building.appliances_electrical_demand[cte.MONTH])] + building.lighting_electrical_demand[cte.YEAR] = [sum(building.lighting_electrical_demand[cte.MONTH])] diff --git a/tests/test_results_import.py b/tests/test_results_import.py index bb80c4ec..4e2bc912 100644 --- a/tests/test_results_import.py +++ b/tests/test_results_import.py @@ -131,9 +131,3 @@ class TestResultsImport(TestCase): self.assertAlmostEqual(total_demand, building.heating_demand[cte.YEAR][0], 3) total_demand = sum(building.heating_demand[cte.MONTH]) self.assertEqual(total_demand, building.heating_demand[cte.YEAR][0], 3) - # if building.name != '12': - # self.assertDictEqual(building.heating_demand, {}) - # self.assertDictEqual(building.cooling_demand, {}) - # self.assertDictEqual(building.domestic_hot_water_heat_demand, {}) - # self.assertDictEqual(building.lighting_electrical_demand, {}) - # self.assertDictEqual(building.appliances_electrical_demand, {}) \ No newline at end of file