diff --git a/costs/cost.py b/costs/cost.py index 29ae4cc..5a4381b 100644 --- a/costs/cost.py +++ b/costs/cost.py @@ -13,6 +13,7 @@ import pandas as pd from hub.persistence.models.city_object import CityObject from configuration import Configuration +from costs.results import Results from life_cycle_costs import LifeCycleCosts @@ -36,7 +37,7 @@ class Cost: retrofitting_year_construction=2020, factories_handler='montreal_custom'): self._buildings = buildings - self._buildings_results = buildings_results + self._results = Results(buildings_results) self._configuration = Configuration(number_of_years, percentage_credit, interest_rate, credit_years, diff --git a/costs/life_cycle_costs.py b/costs/life_cycle_costs.py index 6f216ef..2b3501b 100644 --- a/costs/life_cycle_costs.py +++ b/costs/life_cycle_costs.py @@ -43,11 +43,9 @@ class LifeCycleCosts: capital_cost_other_hvac_ahu = 0 capital_cost_lighting = 0 + chapters = self._archetype.capital_cost - - chapters = archetype.capital_cost - - peak_heating = building.heating_peak_load[cte.YEAR].values[0]/1000 + peak_heating = self._building_results.heating_peak_load[cte.YEAR].values[0]/1000 peak_cooling = building.cooling_peak_load[cte.YEAR].values[0]/1000 # todo: change area pv when the variable exists roof_area = 0 diff --git a/costs/results.py b/costs/results.py new file mode 100644 index 0000000..297bbf4 --- /dev/null +++ b/costs/results.py @@ -0,0 +1,8 @@ +class Results: + def __init__(self, building_results: dict): + self._heating_peak_load = building_results + self._cooling_peak_load = building_results + self._heating_peak_load = building_results + self._heating_peak_load = building_results + self._heating_peak_load = building_results + self._heating_peak_load = building_results \ No newline at end of file