Skip to content

Latest commit

 

History

History

jason

Run OpenStudio Ruby Measures from Node.js

NREL's Building Component Library is a growing database of measures that make modeling building energy efficiency with OpenStudio much easier. In 2014, the measures are only coded in Ruby. Documentation and code logic below shows how to call OpenStudio Ruby Measures from Node.js. This will make it possible to use the measures as off-the-shelf code and build your fully JavaScript web application around it.

Energy Efficiency Measures

For this project, we focused on 3 measures:

  1. Reduce Lighting Loads by Percentage, (code)
  2. Set Window to Wall Ratio by Facade, (code)
  3. Add Output Variable, (code)

Add Measure to OpenStudio Model

The main logic for adding energy efficiency measures with OpenStudio API Node.js bindings is here:

openstudio-model.js#L380-L462

Test

From this current 'jason' directory, in command line, run:

node openstudio-run.js

This will simulate the model default described in buildingData.json.

Example

Before:

After: