Bug fixing in packet
This commit is contained in:
parent
d3bdf3d485
commit
6941484d59
@ -88,8 +88,8 @@ class CapitalCosts(CostBase):
|
|||||||
surface_opaque += thermal_boundary.opaque_area * (1 - thermal_boundary.window_ratio)
|
surface_opaque += thermal_boundary.opaque_area * (1 - thermal_boundary.window_ratio)
|
||||||
surface_transparent += thermal_boundary.opaque_area * thermal_boundary.window_ratio
|
surface_transparent += thermal_boundary.opaque_area * thermal_boundary.window_ratio
|
||||||
|
|
||||||
peak_heating = self._building.heating_peak_load[cte.YEAR].values[0] / 1000
|
peak_heating = self._building.heating_peak_load[cte.YEAR][0] / 1000
|
||||||
peak_cooling = self._building.cooling_peak_load[cte.YEAR].values[0] / 1000
|
peak_cooling = self._building.cooling_peak_load[cte.YEAR][0] / 1000
|
||||||
|
|
||||||
surface_pv = 0
|
surface_pv = 0
|
||||||
for roof in self._building.roofs:
|
for roof in self._building.roofs:
|
||||||
|
@ -20,16 +20,16 @@ class CostBase:
|
|||||||
for thermal_zone in internal_zone.thermal_zones:
|
for thermal_zone in internal_zone.thermal_zones:
|
||||||
self._total_floor_area += thermal_zone.total_floor_area
|
self._total_floor_area += thermal_zone.total_floor_area
|
||||||
self._archetype = None
|
self._archetype = None
|
||||||
|
self._capital_costs_chapter = None
|
||||||
for archetype in self._configuration.costs_catalog.entries().archetypes:
|
for archetype in self._configuration.costs_catalog.entries().archetypes:
|
||||||
if str(building.function) == configuration.dictionary[str(archetype.function)]:
|
if configuration.dictionary[str(building.function)] == str(archetype.function):
|
||||||
self._archetype = archetype
|
self._archetype = archetype
|
||||||
self._capital_costs_chapter = self._archetype.capital_cost
|
self._capital_costs_chapter = self._archetype.capital_cost
|
||||||
break
|
break
|
||||||
if not self._archetype:
|
if not self._archetype:
|
||||||
raise KeyError(f'archetype not found for function {building.function}')
|
raise KeyError(f'archetype not found for function {building.function}')
|
||||||
|
|
||||||
self._capital_costs_chapter = None
|
|
||||||
self._rng = range(configuration.number_of_years)
|
self._rng = range(configuration.number_of_years)
|
||||||
|
|
||||||
def calculate(self):
|
def calculate(self):
|
||||||
|
@ -39,8 +39,8 @@ class TotalMaintenanceCosts(CostBase):
|
|||||||
roof_area += roof.solid_polygon.area
|
roof_area += roof.solid_polygon.area
|
||||||
surface_pv = roof_area * 0.5
|
surface_pv = roof_area * 0.5
|
||||||
|
|
||||||
peak_heating = building.heating_peak_load[cte.YEAR][cte.HEATING_PEAK_LOAD][0]
|
peak_heating = building.heating_peak_load[cte.YEAR][0]
|
||||||
peak_cooling = building.cooling_peak_load[cte.YEAR][cte.COOLING_PEAK_LOAD][0]
|
peak_cooling = building.cooling_peak_load[cte.YEAR][0]
|
||||||
|
|
||||||
maintenance_heating_0 = peak_heating * archetype.operational_cost.maintenance_heating
|
maintenance_heating_0 = peak_heating * archetype.operational_cost.maintenance_heating
|
||||||
maintenance_cooling_0 = peak_cooling * archetype.operational_cost.maintenance_cooling
|
maintenance_cooling_0 = peak_cooling * archetype.operational_cost.maintenance_cooling
|
||||||
|
Loading…
Reference in New Issue
Block a user