Applying measures in Python workflow and simulating

asked 2023-11-15 19:39:44 -0600

clima337's avatar

updated 2023-11-16 12:56:01 -0600

Hello, I've been able to build out a workflow entirely in Python that loads an .osm file, takes in a measure, finds the right measure (using the NREL Comstock ones ), copy the requisite files over and create a workflow.osw that incorporates the measure steps. This file structure includes building_name/files , building_name/measures and building_name/workflow.osw . That's all working fine. However when I convert the .osm to an .idf and run an E+ simulation, it doesn't incorporate the measures. I realize that the .idf conversion is not capturing what the measures are doing.

I have tried to change that by creating a workflowJson object and setting it to the new .osw file, but it seems to have no effect. Does anyone know if the workflow I'm trying to do is possible?

My pseudo code:

# make a new workflow.osw - there's some magic in this function, but output is a workflow.osw path
outfile = create_workflow_full(bpath, upgrades, weather_path="weather.epw")
# load model
b0 = osm.model.Model.load(bpath).get()
# try to load the workflow
workflow = b0.workflowJSON().load(outfile).get()
# maybe setting it might do something?
v = translator.translateModel(b0)
# convert to IDF, ideally with the measures applied')
edit retag flag offensive close merge delete