Applying measures in Python workflow and simulating
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 https://github.com/NREL/ComStock/tree... ), 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?
b0.setWorkflowJSON(workflow)
v = translator.translateModel(b0)
# convert to IDF, ideally with the measures applied
v.save(idf_path')
... not enough space in comment, see sort-of-answer below ...