Complete basic clean up and warning removal

This commit is contained in:
Guille Gutierrez 2023-05-31 10:54:38 -04:00
parent b65ab80c8a
commit f77df925ba

View File

@ -176,7 +176,6 @@ class LifeCycleCosts:
archetype = self._archetype
total_floor_area = self._total_floor_area
price_increase = 0
for year in range(1, self._number_of_years + 1):
price_increase = math.pow(1 + self._consumer_price_index, year)
if year == self._number_of_years:
@ -197,9 +196,10 @@ class LifeCycleCosts:
domestic_hot_water_electricity = 0
if self._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]
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]
)
if self._fuel_type == 0:
electricity_heating = building.heating_consumption[cte.YEAR][0] / 1000
domestic_hot_water_electricity = building.domestic_hot_water_consumption[cte.YEAR][0] / 1000
@ -207,9 +207,11 @@ class LifeCycleCosts:
electricity_cooling = building.cooling_consumption[cte.YEAR][0] / 1000
electricity_lighting = building.lighting_electrical_demand[cte.YEAR]['insel meb'] / 1000
electricity_plug_loads = building.appliances_electrical_demand[cte.YEAR]['insel meb'] / 1000
electricity_distribution = 0 # building.distribution_systems_electrical_consumption[cte.YEAR][0]/1000
total_electricity_consumption = electricity_heating + electricity_cooling + electricity_lighting + \
domestic_hot_water_electricity + electricity_plug_loads + electricity_distribution
electricity_distribution = 0
total_electricity_consumption = (
electricity_heating + electricity_cooling + electricity_lighting + domestic_hot_water_electricity +
electricity_plug_loads + electricity_distribution
)
# todo: change when peak electricity demand is coded. Careful with factor residential
peak_electricity_demand = 100 # self._peak_electricity_demand
@ -226,11 +228,13 @@ class LifeCycleCosts:
price_increase_electricity = math.pow(1 + self._electricity_price_index, year)
price_increase_peak_electricity = math.pow(1 + self._electricity_peak_index, year)
price_increase_gas = math.pow(1 + self._gas_price_index, year)
self._yearly_operational_costs.at[year, 'Fixed_costs_electricity_peak'] = peak_electricity_cost_year_0 * \
price_increase_peak_electricity
self._yearly_operational_costs.at[year, 'Fixed_costs_electricity_peak'] = (
peak_electricity_cost_year_0 * price_increase_peak_electricity
)
self._yearly_operational_costs.at[year, 'Fixed_costs_electricity_monthly'] = monthly_electricity_cost_year_0 * \
price_increase_peak_electricity
self._yearly_operational_costs.at[year, 'Fixed_costs_electricity_monthly'] = (
monthly_electricity_cost_year_0 * price_increase_peak_electricity
)
self._yearly_operational_costs.at[year, 'Variable_costs_electricity'] = float(
variable_electricity_cost_year_0 * price_increase_electricity
)