Usage Instructions¶
Setup¶
To get started:
- Download OpenStudio 3.5.0 and install the Command Line Interface/EnergyPlus/C++ API components, or use the nrel/openstudio docker image.
- Download the latest release.
Running¶
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)).
Note
If the 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.
Basic Run¶
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 (--hourly
, --daily
, --monthly
, or --timestep
).
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
Run openstudio workflow/run_simulation.rb -h
to see all available commands/arguments.
Advanced Run¶
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 workflow/template-run-hpxml.osw
.
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
Outputs¶
A variety of high-level annual outputs are conveniently reported in the resulting run/results_annual.csv
(or run/results_annual.json
or run/results_annual.msgpack
) file.
When timeseries outputs are requested, they will be found in the run/results_timeseries.csv
(or run/results_timeseries.json
or run/results_timeseries.msgpack
) file.
See Workflow Outputs for a description of all available outputs available.