Final version summercourse

This commit is contained in:
Oriol Gavalda 2023-07-17 09:47:15 -04:00
parent 6c4559b3d6
commit 44dff9b47e

View File

@ -152,7 +152,7 @@ class Results:
metadata_file.write(file)
def outputsforgraph(self):
file = 'city name: ' + self._city.name + '\n'
outputs_energy =pd.DataFrame()
array = [None] * 12
for building in self._city.buildings:
if cte.MONTH in building.heating_demand.keys():
@ -268,10 +268,13 @@ class Results:
dhw_consumption_results.values.sum(),
extra_electrical_consumption.values.sum()
]
outputs_energy[f'building {building.name}'] = listgraph
outputs_energy.index = ['Lighting consumption', 'Appliances consumption', 'Heating consumption',
'Cooling consumption', 'DHW consumption', 'Extra electrical consumption']
total_final_energy = (lighting_results.values.sum() + appliances_results.values.sum() + \
heating_consumption_results.values.sum() + cooling_consumption_results.values.sum() + \
dhw_consumption_results.values.sum() + extra_electrical_consumption.values.sum())/1000
return listgraph, total_final_energy
return outputs_energy, total_final_energy