First time here? Check our help page!
3

Running several measures directly within OS SDK scripting environment

Is there a documented workflow or example to run several existing OpenStudio measures from the BCL (i.e., "ZEDG VRF with DOAS" followed by "SetSpaceInfiltrationPerExteriorArea") within an OpenStudio SDK scripting environment? I'm trying to programmatically look-up / apply several measures within a single script, and hopefully without reverse engineering the measures in their entirety.

mikesweeney's avatar
493
mikesweeney
asked 2022-01-18 14:04:13 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2022-01-18 17:51:12 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

5

This 'OpenStudio CLI Template' project is a good resource for using the Ruby bindings to load measures as OpenStudio::MeasureSteps, and add them to a WorkFlowJSON.

ericringold's avatar
10.6k
ericringold
answered 2022-01-18 15:57:09 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

A variation on @Eric Ringold's solution. This example BESTEST OSW just gives you a look at pre-made OSW files that are still run with the CLI. These are JSON files you can make and edit with any text editor. Note the name, description, and modeler description fields for each measure are optional. they won't impact how it functions. It is important that if you have EnergyPlus measures they appear after OpenStudio Measures, and that reporting measures appear after any EnergyPlus measures. After you run the OSW with the CLI, an overloaded copy of the input OSW will be created with measure logs that contain info, warning, and register value statements.

This repositoryhas a more complex approach but may be useful. All BCL measures are also in GitHub.com as Ruby gems. This rake tasks installs the gems that contains the measures and updates the measure paths in the OSW. This is a way to keep a repository very light weight (without any measures) but still easy to test and update.

David Goldwasser's avatar
20.4k
David Goldwasser
answered 2022-01-24 19:08:58 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments