Git Product home page Git Product logo

openstudio-workflow-gem's Introduction

OpenStudio::Workflow

Circle CI Coverage Status Dependency Status

OpenStudio Workflow Gem

This branch is the development branch for the OpenStudio workflow gem.

Installation

The OpenStudio Workflow Gem has the following dependencies:

  • Ruby 2.0
  • OpenStudio with Ruby 2.0 bindings
  • EnergyPlus 8.3 (assuming OpenStudio >= 1.7.2)
  • MongoDB if using MongoDB Adapter (or when running rspec)

OpenStudio needs to be installed and in your path. On Mac/Linux it is easiest to add the following to your .bash_profile or /etc/profile.d/.sh to ensure OpenStudio can be loaded.

export OPENSTUDIO_ROOT=/usr/local
export RUBYLIB=$OPENSTUDIO_ROOT/lib/ruby/site_ruby/2.0.0

Add this line to your application's Gemfile:

gem 'OpenStudio-workflow'

And then execute:

Mac/Linux:

    $ bundle
    
Windows (avoids native extensions):

    $ bundle install --without xml profile

Or install it yourself as:

$ gem install OpenStudio-workflow

Usage

Note that the branches of the Workflow Gem depict which version of EnergyPlus is in use. The develop branch at the moment should not be used.

There are currently two adapters to run OpenStudio workflow. The first is a simple Local adapter allowing the user to pass in the directory to simulation. The directory must have an analysis/problem JSON file and a datapoint JSON file. The workflow manager will use these data (and the measures, seed model, and weather data) to assemble and execute the standard workflow of (preflight->openstudio measures->energyplus->postprocess).

r = OpenStudio::Workflow.load 'Local', '/home/user/a_directory', options
r.run

The workflow manager can also use MongoDB to receive instructions on the workflow to run and the data point values.

Caveats and Todos

Todos

  • Add a test to ensure that the models being returned contain alterations after apply_measure
  • Add unit tests for each util method
  • Define and document the complete set of options for the adapter and run classes
  • Implement better error handling with custom exception classes

Testing

The preferred way for testing is to run rspec either natively or via docker.

Locally

rspec spec/

Docker

export OPENSTUDIO_VERSION=1.13.0
docker run -v $(pwd):/var/simdata/openstudio \
      nrel/openstudio:$OPENSTUDIO_VERSION \
      /var/simdata/openstudio/test/bin/docker-run.sh

Contributing

  1. Fork it ( https://github.com/NREL/OpenStudio-workflow/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

openstudio-workflow-gem's People

Contributors

axelstudios avatar brianlball avatar henryhorsey avatar kbenne avatar macumber avatar nllong avatar rhorsey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.