added workshop_ep_workflow.py for tomorrow

This commit is contained in:
Pilar 2022-03-24 19:41:03 -04:00
parent 1629b6374b
commit 8de9d1d1ee

View File

@ -0,0 +1,33 @@
import sys
from pathlib import Path
sys.path.append('C:/Users/Pilar/PycharmProjects/libs')
from imports.geometry_factory import GeometryFactory
from imports.construction_factory import ConstructionFactory
from imports.usage_factory import UsageFactory
from imports.schedules_factory import SchedulesFactory
from exports.exports_factory import ExportsFactory
gml_file = 'C:/Users/Pilar/PycharmProjects/libs/unittests/tests_data/one_building_in_kelowna.gml'
city = GeometryFactory('citygml', gml_file).city
ConstructionFactory('nrel', city).enrich()
UsageFactory('comnet', city).enrich()
SchedulesFactory('comnet', city).enrich()
for building in city.buildings:
for usage in building.usage_zones:
if usage.cooling_setpoint is None:
usage.cooling_setpoint = 22.0
if usage.heating_setpoint is None:
usage.heating_setpoint = 22.0
out_path = (Path(__file__).parent.parent / 'out_files')
_idf = ExportsFactory('idf', city, out_path).export()
_idf.run()