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

Running several measures directly within OS SDK scripting environment

asked 2022-01-18 14:04:13 -0600

mikesweeney's avatar

updated 2022-01-18 17:51:12 -0600

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.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2022-01-18 15:57:09 -0600

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.

edit flag offensive delete link more
1

answered 2022-01-24 19:08:58 -0600

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2022-01-18 14:04:13 -0600

Seen: 462 times

Last updated: Jan 24 '22