Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

There is no simple method to call to run an OpenStudio workflow using the SDK. Rather, you save the workflow to an OSW file:

workflow.setOswPath("foo.osw")
workflow.save()

And then you run it via the CLI:

import subprocess
subprocess.run(["openstudio", "run", "-w", "foo.osw"])

There is no simple method to call to run an OpenStudio workflow using the SDK. Rather, you save the workflow to an OSW file:

workflow.setOswPath("foo.osw")
workflow.save()

And then you run it via the CLI:

import subprocess
subprocess.run(["openstudio", "run", "-w", "foo.osw"])

Running the CLI will do everything for you -- run the different measures (model measures, EnergyPlus measures, reporting measures) in the appropriate sequence, translate the model to IDF, and run the EnergyPlus simulation.

There is no simple method to call to run an OpenStudio workflow using the SDK. Rather, you save the workflow to an OSW file:

workflow.setOswPath("foo.osw")
workflow.save()

And then you run it via the CLI:

import subprocess
subprocess.run(["openstudio", "run", "-w", "foo.osw"])

Running the CLI will do everything for you -- run the different measures (model apply any model measures, EnergyPlus measures, reporting measures) in the appropriate sequence, translate the model to IDF, and apply any EnergyPlus measures, run the EnergyPlus simulation.simulation, and finally apply any reporting measures.

There is no simple method to call to run an OpenStudio workflow using the SDK. Rather, you save the workflow to an OSW file:

workflow.setOswPath("foo.osw")
workflow.save()

And then you run it via the CLI:

import subprocess
subprocess.run(["openstudio", "run", "-w", "foo.osw"])

Running the CLI will do everything for you -- apply any model measures, translate the model to IDF, apply any EnergyPlus measures, run the EnergyPlus simulation, and finally apply any reporting measures.