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

Revision history [back]

A recommended generalized workflow for exercising/examining the results of the OpenStudio Example EMS measures is as follows:

Recommended Workflow Step (1): Inside the "tests" subfolder of each example OpenStudio EMS measure, you will find an OpenStudio file titled mxx_wo_EEM..osm

Use the OS Application to open this .osm file, save it elsewhere, and execute a simulation against it. Some .osm files will take longer then others to simulate, running a "design day" only run is sufficient as the goal is to retrieve the "in.osm" and "in.idf" files generated and stored in the "run" subdirectory of the OpenStudio model results.

Recommended Workflow Step (2a) Use the Openstudio "Apply Measure Now" functionality to apply the OpenStudio EMS measure to the model executed in step (1) to the model. Initially (to support learning), consider configuring the OpenStudio EMS measure arguments to ask for "verbose" outputs. Beware, for some measures, this can create very large output files associated with EnergyPlus EMS output. Carefully study the OpenStudio 'generated "Info" messages that the Apply Measure Now workflow generates. Save the altered .osm file as a new name, then execute the simulation. In addition to carefully reviewing the "measure.rb" file associated with the OpenStudio EMS measure, use a 'diff' tool to compare the "in.osm" and "in.idf" files generated by step (1) and step (2a).

The set of measures in the repository were initially were tested using this prescribed workflow and I have confirmed that m13 runs successfully in this manner using OS 2.7.1, Windows 7Pro, 64bit.

Alternative Workflow Step (2b) Use the OpenStudio Application "Apply Sidecar Measure" feature to add the Openstudio EMS measure to the OpenStudio workflow of your model. This method is more fragile then theworkflow using (2a), especially when leaning, as the OpenStudio EMS measure may fail if a previously applied measure alters the 'seed' .osm model in a way the OpenStudio EMS measure did not anticipate. In this case, the EMS measure may complete but EnergyPlus may fail in a very ungraceful manner. For example, consider an OpenStudio measure that removes all window surfaces from a model, and an OpenStudio EMS measure that alters the properties of a specific window. Results will differ, depending on how these measures are ordered/stacked. The EMS measure will kindly throw a flag and write a N/A message if a model with no surfaces to apply it to is detected, but other scenarios will likely slip through the 'edge-case trapping' logic, as it was not designed to be exhaustive.

To return to the focus of the question - consider using workflow (2a) to learn how the OpenStudio EMS measure articulates a "seed" model, review (diff) the input file results after applying the measure to your model, review the output results to ensure you are getting what you expected, then consider cloning the example measure or pirating sections of ruby snippets and modifying them to suit your unique use-case.