checked units
This commit is contained in:
parent
47ff19a842
commit
d8c0644709
@ -20,6 +20,7 @@ class TotalOperationalCosts(CostBase):
|
||||
"""
|
||||
End of life costs class
|
||||
"""
|
||||
|
||||
def __init__(self, building: Building, configuration: Configuration):
|
||||
super().__init__(building, configuration)
|
||||
self._yearly_operational_costs = pd.DataFrame(
|
||||
@ -48,11 +49,12 @@ class TotalOperationalCosts(CostBase):
|
||||
variable_gas_cost_year_0 = 0
|
||||
electricity_heating = 0
|
||||
domestic_hot_water_electricity = 0
|
||||
# todo: each fuel has different units that have to be processed
|
||||
if self._configuration.fuel_type == 1:
|
||||
fixed_gas_cost_year_0 = archetype.operational_cost.fuels[1].fixed_monthly * 12 * factor_residential
|
||||
variable_gas_cost_year_0 = (
|
||||
(building.heating_consumption[cte.YEAR][0] + building.domestic_hot_water_consumption[cte.YEAR][0]) / 1000 *
|
||||
archetype.operational_cost.fuels[1].variable[0]
|
||||
(building.heating_consumption[cte.YEAR][0] + building.domestic_hot_water_consumption[cte.YEAR][0])
|
||||
/ 1000 * cte.WATTS_HOUR_TO_JULES * archetype.operational_cost.fuels[1].variable[0]
|
||||
)
|
||||
if self._configuration.fuel_type == 0:
|
||||
electricity_heating = building.heating_consumption[cte.YEAR][0] / 1000
|
||||
@ -70,8 +72,9 @@ class TotalOperationalCosts(CostBase):
|
||||
# todo: change when peak electricity demand is coded. Careful with factor residential
|
||||
peak_electricity_load = PeakLoad(building).electricity_peak_load
|
||||
peak_load_value = peak_electricity_load.max(axis=1)
|
||||
peak_electricity_demand = peak_load_value[1]/1000 # self._peak_electricity_demand adapted to kW
|
||||
variable_electricity_cost_year_0 = total_electricity_consumption * archetype.operational_cost.fuels[0].variable[0]
|
||||
peak_electricity_demand = peak_load_value[1] / 1000 # self._peak_electricity_demand adapted to kW
|
||||
variable_electricity_cost_year_0 = \
|
||||
total_electricity_consumption * cte.WATTS_HOUR_TO_JULES * archetype.operational_cost.fuels[0].variable[0]
|
||||
peak_electricity_cost_year_0 = peak_electricity_demand * archetype.operational_cost.fuels[0].fixed_power * 12
|
||||
monthly_electricity_cost_year_0 = archetype.operational_cost.fuels[0].fixed_monthly * 12 * factor_residential
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user