From 8de9d1d1ee42c571541f0886057703255b105769 Mon Sep 17 00:00:00 2001 From: Pilar Date: Thu, 24 Mar 2022 19:41:03 -0400 Subject: [PATCH] added workshop_ep_workflow.py for tomorrow --- scripts/workshop_ep_workflow.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 scripts/workshop_ep_workflow.py diff --git a/scripts/workshop_ep_workflow.py b/scripts/workshop_ep_workflow.py new file mode 100644 index 00000000..41d3d5c2 --- /dev/null +++ b/scripts/workshop_ep_workflow.py @@ -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()