updated to last hub version
This commit is contained in:
parent
e629196280
commit
4d3cdf6d8d
|
@ -15,9 +15,10 @@ class Co2Emission:
|
|||
|
||||
def __init__(self, building: Building, emissions_factor=None):
|
||||
if emissions_factor is None:
|
||||
emissions_factor = {cte.GAS: 0.2025,
|
||||
cte.ELECTRICITY: 0.00113,
|
||||
cte.DIESEL: 0.2683,
|
||||
# kgCO2 / J
|
||||
emissions_factor = {cte.GAS: 56.25480769E-9,
|
||||
cte.ELECTRICITY: 0.313840909E-9,
|
||||
cte.DIESEL: 74.52882883E-9,
|
||||
cte.RENEWABLE: 0}
|
||||
self._emissions_factor = emissions_factor
|
||||
self._building = building
|
||||
|
@ -65,7 +66,7 @@ class Co2Emission:
|
|||
results_by_time_period = {}
|
||||
for time_period in self._building.lighting_electrical_demand:
|
||||
values = []
|
||||
for value in self._building.lighting_electrical_demand[time_period]['insel meb']:
|
||||
for value in self._building.lighting_electrical_demand[time_period]:
|
||||
values.append(value * self._emissions_factor[cte.ELECTRICITY])
|
||||
results_by_time_period[time_period] = values
|
||||
results[cte.LIGHTING] = results_by_time_period
|
||||
|
@ -73,7 +74,7 @@ class Co2Emission:
|
|||
results_by_time_period = {}
|
||||
for time_period in self._building.appliances_electrical_demand:
|
||||
values = []
|
||||
for value in self._building.appliances_electrical_demand[time_period]['insel meb']:
|
||||
for value in self._building.appliances_electrical_demand[time_period]:
|
||||
values.append(value * self._emissions_factor[cte.ELECTRICITY])
|
||||
results_by_time_period[time_period] = values
|
||||
results[cte.APPLIANCES] = results_by_time_period
|
||||
|
|
Loading…
Reference in New Issue
Block a user