diff --git a/monthly_energy_balance_engine.py b/monthly_energy_balance_engine.py index 42712d0..68d0484 100644 --- a/monthly_energy_balance_engine.py +++ b/monthly_energy_balance_engine.py @@ -14,8 +14,8 @@ class MonthlyEnergyBalanceEngine: self._city = city self._file_path = file_path EnergyBuildingsExportsFactory('insel_monthly_energy_balance', self._city, self._file_path).export() - ResultFactory('insel_meb', self._city, self._file_path).enrich() self._run() + ResultFactory('insel_meb', self._city, self._file_path).enrich() def _run(self): """ diff --git a/results.py b/results.py index cd65dc1..4887248 100644 --- a/results.py +++ b/results.py @@ -12,16 +12,23 @@ class Results: print_results = None file = 'city name: ' + self._city.name + '\n' for building in self._city.buildings: - heating_results = building.heating[cte.MONTH].rename(columns={'INSEL': f'{building.name} heating Wh'}) - cooling_results = building.cooling[cte.MONTH].rename(columns={'INSEL': f'{building.name} cooling Wh'}) + heating_results = building.heating[cte.MONTH].rename(columns={cte.INSEL_MEB: f'{building.name} heating Wh'}) + cooling_results = building.cooling[cte.MONTH].rename(columns={cte.INSEL_MEB: f'{building.name} cooling Wh'}) + lighting_results = building.lighting_electrical_demand[cte.MONTH]\ + .rename(columns={cte.INSEL_MEB: f'{building.name} lighting electrical demand Wh'}) + appliances_results = building.appliances_electrical_demand[cte.MONTH]\ + .rename(columns={cte.INSEL_MEB: f'{building.name} appliances electrical demand Wh'}) + dhw_results = building.domestic_hot_water_heat_demand[cte.MONTH]\ + .rename(columns={cte.INSEL_MEB: f'{building.name} domestic hot water demand Wh'}) if print_results is None: print_results = heating_results else: print_results = pd.concat([print_results, heating_results], axis='columns') - print_results = pd.concat([print_results, cooling_results, - building.lighting_electrical_demand, - building.appliances_electrical_demand, - building.domestic_hot_water_heat_demand], axis='columns') + print_results = pd.concat([print_results, + cooling_results, + lighting_results, + appliances_results, + dhw_results], axis='columns') file += '\n' file += 'name: ' + building.name + '\n' file += 'year of construction: ' + str(building.year_of_construction) + '\n'