To get started:
To programatically run simulations, it’s recommended to use the OpenStudio Command Line Interface. Two general approaches (basic and advanced) for running via the CLI are described below. The OpenStudio measures can also be run from user interfaces (e.g., the OpenStudio Application or OpenStudio Parametric Analysis Tool (PAT)).
openstudio command is not found, it’s because the executable is not in your PATH. Either add the executable to your PATH or point directly to the executable found in the openstudio-X.X.X/bin directory.
workflow/run_simulation.rb script. For example:
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml
You can also request generation of timeseries output CSV/JSON/MessagePack files as part of the calculation by providing one or more timeseries flags (
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml --hourly ALL
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml --monthly fuels --monthly temperatures --output-format json
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml --add-detailed-schedule stochastic
openstudio workflow/run_simulation.rb -h to see all available commands/arguments.
If additional flexibility is desired (e.g., specifying individual measure arguments, including additional OpenStudio measures to run alongside this measure in a workflow, etc.), create an OpenStudio Workflow (OSW) file.
The OSW is a JSON file that will specify all the OpenStudio measures (and their arguments) to be run sequentially.
A template OSW that simply runs the HPXMLtoOpenStudio, ReportSimulationOutput, and ReportUtilityBills measures on the
workflow/sample_files/base.xml file can be found at
openstudio run -w workflow/template-run-hpxml.osw
openstudio run -w workflow/template-run-hpxml-with-stochastic-occupancy.osw
openstudio run -w workflow/template-build-and-run-hpxml-with-stochastic-occupancy.osw
A variety of high-level annual outputs are conveniently reported in the resulting
When timeseries outputs are requested, they will be found in the
See Workflow Outputs for a description of all available outputs available.