Remove generic_energy_system methods add loop for generation_systems
This commit is contained in:
parent
e9f135d616
commit
1afdac3146
@ -40,7 +40,8 @@ class Co2Emission:
|
||||
"""
|
||||
results = {}
|
||||
for energy_system in self._building.energy_systems:
|
||||
fuel_type = energy_system.generation_system.generic_generation_system.fuel_type
|
||||
for generation_system in energy_system.generation_systems:
|
||||
fuel_type = generation_system.fuel_type
|
||||
emissions_factor = self._emissions_factor[fuel_type]
|
||||
for demand_type in energy_system.demand_types:
|
||||
if demand_type == cte.ELECTRICITY:
|
||||
@ -59,6 +60,7 @@ class Co2Emission:
|
||||
values = [v * emissions_factor for v in self._building.domestic_hot_water_consumption[time_period]]
|
||||
results_by_time_period[time_period] = values
|
||||
results[demand_type] = results_by_time_period
|
||||
|
||||
emission_factor = self._emissions_factor[cte.ELECTRICITY]
|
||||
results_by_time_period = {}
|
||||
for time_period in self._building.lighting_electrical_demand:
|
||||
|
Loading…
Reference in New Issue
Block a user