Usage Instructions
Setup
To get started:
Download OpenStudio 3.8.0 and install the Command Line Interface/EnergyPlus 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
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml -o my_output_directory
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 --monthly fuels --hourly temperatures --hourly 'Zone People Occupant Count'
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml --hourly ALL --output-format csv_dview
openstudio workflow/run_simulation.rb -x workflow/sample_files/base.xml --add-stochastic-schedules
Building
elements that do not describe multiple dwelling units of Whole SFA/MF Buildings (e.g., two Building
elements for pre- and post-retrofit configurations), you must specify which building ID to run:openstudio workflow/run_simulation.rb -x multiple_buildings.xml --building-id MyBuildingName
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 .json
or .msgpack
) file.
When timeseries outputs are requested, they will be found in the run/results_timeseries.csv
(or .json
or .msgpack
) file.
If multiple timeseries frequencies are requested (e.g., hourly and daily), the timeseries output filenames will include the frequency (e.g., run/results_timeseries_daily.csv
).
See Workflow Outputs for a description of all available outputs.