Compare commits
2 Commits
e9f135d616
...
96406c13fc
Author | SHA1 | Date | |
---|---|---|---|
96406c13fc | |||
|
1afdac3146 |
|
@ -40,25 +40,27 @@ class Co2Emission:
|
||||||
"""
|
"""
|
||||||
results = {}
|
results = {}
|
||||||
for energy_system in self._building.energy_systems:
|
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:
|
||||||
emissions_factor = self._emissions_factor[fuel_type]
|
fuel_type = generation_system.fuel_type
|
||||||
for demand_type in energy_system.demand_types:
|
emissions_factor = self._emissions_factor[fuel_type]
|
||||||
if demand_type == cte.ELECTRICITY:
|
for demand_type in energy_system.demand_types:
|
||||||
continue
|
if demand_type == cte.ELECTRICITY:
|
||||||
results_by_time_period = {}
|
continue
|
||||||
if demand_type == cte.HEATING:
|
results_by_time_period = {}
|
||||||
for time_period in self._building.heating_consumption:
|
if demand_type == cte.HEATING:
|
||||||
values = [v * emissions_factor for v in self._building.heating_consumption[time_period]]
|
for time_period in self._building.heating_consumption:
|
||||||
results_by_time_period[time_period] = values
|
values = [v * emissions_factor for v in self._building.heating_consumption[time_period]]
|
||||||
if demand_type == cte.COOLING:
|
results_by_time_period[time_period] = values
|
||||||
for time_period in self._building.cooling_consumption:
|
if demand_type == cte.COOLING:
|
||||||
values = [v * emissions_factor for v in self._building.cooling_consumption[time_period]]
|
for time_period in self._building.cooling_consumption:
|
||||||
results_by_time_period[time_period] = values
|
values = [v * emissions_factor for v in self._building.cooling_consumption[time_period]]
|
||||||
if demand_type == cte.DOMESTIC_HOT_WATER:
|
results_by_time_period[time_period] = values
|
||||||
for time_period in self._building.domestic_hot_water_consumption:
|
if demand_type == cte.DOMESTIC_HOT_WATER:
|
||||||
values = [v * emissions_factor for v in self._building.domestic_hot_water_consumption[time_period]]
|
for time_period in self._building.domestic_hot_water_consumption:
|
||||||
results_by_time_period[time_period] = values
|
values = [v * emissions_factor for v in self._building.domestic_hot_water_consumption[time_period]]
|
||||||
results[demand_type] = results_by_time_period
|
results_by_time_period[time_period] = values
|
||||||
|
results[demand_type] = results_by_time_period
|
||||||
|
|
||||||
emission_factor = self._emissions_factor[cte.ELECTRICITY]
|
emission_factor = self._emissions_factor[cte.ELECTRICITY]
|
||||||
results_by_time_period = {}
|
results_by_time_period = {}
|
||||||
for time_period in self._building.lighting_electrical_demand:
|
for time_period in self._building.lighting_electrical_demand:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user