forced_u_value_change
This commit is contained in:
parent
47401f2e30
commit
20b6167245
|
@ -12,22 +12,22 @@ class RetrofitFactory:
|
||||||
self._apply_retrofit_to_building(building, wall_u_value, roof_u_value, ground_u_value)
|
self._apply_retrofit_to_building(building, wall_u_value, roof_u_value, ground_u_value)
|
||||||
|
|
||||||
def _apply_retrofit_to_building(self, building: Building, wall_u_value, roof_u_value, ground_u_value):
|
def _apply_retrofit_to_building(self, building: Building, wall_u_value, roof_u_value, ground_u_value):
|
||||||
for internal_zone in building.internal_zones:
|
# for internal_zone in building.internal_zones:
|
||||||
print(internal_zone.id)
|
# print(internal_zone.id)
|
||||||
|
|
||||||
for thermal_zone in internal_zone.thermal_zones_from_internal_zones:
|
for thermal_zone in building.thermal_zones_from_internal_zones:
|
||||||
for thermal_boundary in thermal_zone.thermal_boundaries:
|
for thermal_boundary in thermal_zone.thermal_boundaries:
|
||||||
if wall_u_value and thermal_boundary.type == cte.WALL:
|
if wall_u_value and thermal_boundary.type == cte.WALL:
|
||||||
print(thermal_boundary.u_value)
|
print(thermal_boundary.u_value)
|
||||||
thermal_boundary.u_value = wall_u_value
|
thermal_boundary.u_value = wall_u_value
|
||||||
print(thermal_boundary.u_value)
|
print(thermal_boundary.u_value)
|
||||||
elif roof_u_value and thermal_boundary.type == cte.ROOF:
|
elif roof_u_value and thermal_boundary.type == cte.ROOF:
|
||||||
print("roof", thermal_boundary.u_value)
|
print("roof", thermal_boundary.u_value)
|
||||||
thermal_boundary.u_value = roof_u_value
|
thermal_boundary.u_value = roof_u_value
|
||||||
print("roof", thermal_boundary.u_value)
|
print("roof", thermal_boundary.u_value)
|
||||||
elif ground_u_value and thermal_boundary.type == cte.GROUND:
|
elif ground_u_value and thermal_boundary.type == cte.GROUND:
|
||||||
thermal_boundary.u_value = ground_u_value
|
thermal_boundary.u_value = ground_u_value
|
||||||
print("ground", thermal_boundary.u_value)
|
print("ground", thermal_boundary.u_value)
|
||||||
|
|
||||||
def enrich(self):
|
def enrich(self):
|
||||||
# This method can be expanded to include different retrofit strategies
|
# This method can be expanded to include different retrofit strategies
|
||||||
|
|
3
main.py
3
main.py
|
@ -6,6 +6,7 @@ from hub.helpers.dictionaries import Dictionaries
|
||||||
from hub.imports.construction_factory import ConstructionFactory
|
from hub.imports.construction_factory import ConstructionFactory
|
||||||
from hub.imports.usage_factory import UsageFactory
|
from hub.imports.usage_factory import UsageFactory
|
||||||
from hub.imports.weather_factory import WeatherFactory
|
from hub.imports.weather_factory import WeatherFactory
|
||||||
|
from hub.imports.retrofit_factory import RetrofitFactory
|
||||||
# Specify the GeoJSON file path
|
# Specify the GeoJSON file path
|
||||||
input_files_path = (Path(__file__).parent / 'input_files')
|
input_files_path = (Path(__file__).parent / 'input_files')
|
||||||
input_files_path.mkdir(parents=True, exist_ok=True)
|
input_files_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
@ -23,6 +24,8 @@ city = GeometryFactory('geojson',
|
||||||
# Enrich city data
|
# Enrich city data
|
||||||
ConstructionFactory('cerc', city).enrich()
|
ConstructionFactory('cerc', city).enrich()
|
||||||
UsageFactory('cerc', city).enrich()
|
UsageFactory('cerc', city).enrich()
|
||||||
|
RetrofitFactory('basic', city).enrich()
|
||||||
|
|
||||||
WeatherFactory('epw', city).enrich()
|
WeatherFactory('epw', city).enrich()
|
||||||
energy_plus_workflow(city)
|
energy_plus_workflow(city)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user