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

Reporting Measure: Report measures previously run on a model

asked 2017-05-22 14:44:36 -0500

antonszilasi gravatar image

updated 2020-07-31 08:20:02 -0500

Dear all,

After running a series of measures by either using the OpenStudio desktop app or by using the OpenStudio-analysis spreadsheet, I would then like to use my own reporting measure which would write a JSON that would contain the changes that the previously applied measures made to the model. e.g: The set LPD measure, set the lighting load to 2 W/m2, the set wall R-value measure set the wall R-value to R-19 etc.

Unfortunately, I am not sure how to obtain this information, is there a log of the measures applied to the model which I can query?

Any pointers would be most appreciated!


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-22 15:18:58 -0500

updated 2019-09-05 12:22:17 -0500

OpenStudio 2.x introduced the OpenStudio Workflow (OSW). This is used by the OpenStudio application to run a single datapoint, and by PAT to run multiple datapoints (each datapoint has it's own in.osw file). It is not used by the "Apply Measure Now" dialog which applies a measure dynamically to your currently loaded model. An OSW identifies the seed model and EPW to be passed into a workflow, as well as the measures and measure arguments to be applied.

Before a simulation has been run you may find an file named "in.osw" or "data_point.osw", but after the simulation there should be an "out.osw" that is overloaded with additional information such as the info, warning, and error and messages generated by the measure when it was run.

You might be able to use this OSW file, which is structured as JSON, but there are some alternate options.

  1. Use the out.osw (described above)
  2. If you are running an algorithmic workflow (using PAT or Analysis Spreadsheet) you can download the CSV (results) from the analysis page. This CSV will have a row for each datapoint, and a column for each input variable used as well as output variables that have been requested.
  3. OpenStudio measure have access to the OpenStudio Workflow through `runner.workflow.workflowSteps'. you could harvest data out of the OSW (pre or post simulation) and write out to the file format of your choice, after filtering or post-processing data how you want. An example use case we had for this was a variable describing when I building was built, that we wanted to maintain across multiple measures.
  4. Probably a better option than 3 (if you don't want to use it to change the downstream measure behavior) is to write your own custom PAT Project scripts, which is what you see on the results page. It is written in javascript. It doesn't have access to the OSM or EnergyPlus SQL file directly like a OpenStudio reporting measure does, but it does have access to anything in the OSW file, which includes any input values to measures or data pulled out of the SQL file by measures files using the 'runner.registerValue' method.

If you have more detailed questions about any of these three approaches, let me know. You get 1 for free, so I'd start with that and see if it works for what you need. I will point out that the out.osw can be long and harder to look through so you may want to look at the in.osw or data_point.osw first.

edit flag offensive delete link more


@David Goldwasser Thank you for your answer David, when running the desktop app I do see out.osw and workflow.osw in the run directory I also see data_point_out.json and results.json. Can you please confirm that these files are also generated in the same structure on the OpenStudio server?

antonszilasi gravatar image antonszilasi  ( 2017-05-22 17:39:42 -0500 )edit

They are the same.

ljbrackney gravatar image ljbrackney  ( 2017-05-22 19:41:55 -0500 )edit

@David Goldwasser I actually wrote this measure to read the measure_attributes.json, but as I understand it, it would be preferable to use the out.osw file am I correct? If this is the case why should I use the out.osw file over the measure_attributes.json file?

antonszilasi gravatar image antonszilasi  ( 2017-05-30 11:56:36 -0500 )edit

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


Asked: 2017-05-22 14:44:36 -0500

Seen: 167 times

Last updated: Sep 05 '19