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

Does anyone have a simple OS measure template that just calls other measures?

asked 2017-10-06 20:42:58 -0500

joshdr83 gravatar image

updated 2017-10-07 09:29:17 -0500

I find myself using a few dozen 'Run Measure Now" measures over and over again. They also need to be run in a certain order. Does anyone have a simple template that I could use to automate that process? Some of the measures need input, so could that also be done in a meta-measure?

Would it be better to just copy the contents of all the measures I want into a single one?

Has anyone tried something like this before?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2017-10-10 09:55:29 -0500

shorowit gravatar image

updated 2017-10-10 11:26:00 -0500

We have a meta_measure.rb helper script you may be interested in. It's not really documented, but the script will:

  1. Help you get your measures and measure arguments in the needed format (call update_args_hash method once for each measure).
  2. Runs the measures with checks for valid arguments as possible (call run_measure method).
  3. (Optional) Runs the measures in the order specified by a user-defined json file (workflow_json argument to above method). If not provided, it will simply run the measures in the order that you added measures/arguments.
  4. (Optional) Creates a measures.osw that includes all the measures and measure arguments that were run for debugging purposes (osw_out argument to above method).
  5. (Optional) Shows the measures & arguments called for debugging purposes via runner.registerInfo (show_measure_calls argument to above method).

Here is a simple example of it being used.

edit flag offensive delete link more
4

answered 2017-10-10 00:51:10 -0500

Yes, there is a way to call a measure, or multiple measures from inside another measure, but that does take a little but of setup. You can borrow the code from measure tests, and place it in the run section of a measure. Do this multiple times to run more than one measure. File management of measures can create issues.

Another idea you might consider is to create a new OSM file, and then place all the measure you want to run in the workflow of measures tab. Now quit OpenStudio. You can now run 'workflow.osw' using the CLI to quickly run all the measure on any OSM file. Here is link to CLI documentation

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

 

Question Tools

1 follower

Stats

Asked: 2017-10-06 20:42:58 -0500

Seen: 77 times

Last updated: Oct 10