-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
127 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Copyright (c) 2008-2013, Alliance for Sustainable Energy. | ||
All rights reserved. | ||
|
||
NOTICE | ||
|
||
This computer software (Software) is code in development prepared by the | ||
Alliance for Sustainable Energy, (hereinafter the "Contractor"), under | ||
Contract DE-AC36-08GO28308 (Contract) with the Department of Energy (DOE). | ||
The United States Government has been granted for itself and others acting | ||
on its behalf a paid-up, non-exclusive, irrevocable, worldwide license in | ||
the Software to reproduce, prepare derivative works, and perform publicly | ||
and display publicly. Beginning five (5) years after the date permission | ||
to assert copyright is obtained from the DOE, and subject to any | ||
subsequent five (5) year renewals, the United States Government is granted | ||
for itself and others acting on its behalf a paid-up, non-exclusive, | ||
irrevocable, worldwide license in the Software to reproduce, prepare | ||
derivative works, distribute copies to the public, perform publicly and | ||
display publicly, and to permit others to do so. If the Contractor ceases | ||
to make this computer software available, it may be obtained from DOE's | ||
Office of Scientific and Technical Information's Energy Science and | ||
Technology Software Center (ESTSC) at P.O. Box 1020, Oak Ridge, TN 37831- | ||
1020. | ||
|
||
DISCLAIMER | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE CONTRACTOR "AS IS" AND ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
NO EVENT SHALL THE CONTRACTOR OR THE U.S. GOVERNMENT BE LIABLE FOR ANY | ||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER, | ||
INCLUDING BUT NOT LIMITED TO CLAIMS ASSOCIATED WITH THE LOSS OF DATA OR | ||
PROFITS, WHICH MAY RESULT FROM AN ACTION IN CONTRACT, NEGLIGENCE OR OTHER | ||
TORTIOUS CLAIM THAT ARISES OUT OF OR IN CONNECTION WITH THE ACCESS, USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
|
||
YOU AGREE TO INDEMNIFY DOE/NREL/ALLIANCE, AND ITS SUBSIDIARIES, | ||
AFFILIATES, OFFICERS, AGENTS, AND EMPLOYEES AGAINST ANY CLAIM OR DEMAND, | ||
INCLUDING REASONABLE ATTORNEYS' FEES, RELATED TO YOUR USE OF THESE DATA. | ||
|
||
DOE/NREL/Alliance is not obligated to provide the user with any support, | ||
consulting, training or assistance of any kind with regard to the use of | ||
these Data or to provide the user with any updates, revisions or new | ||
versions of these Data. | ||
|
||
The names DOE/NREL/Alliance may not be used in any advertising or | ||
publicity to endorse or promote any products or commercial entities unless | ||
specific written permission is obtained from DOE/NREL/Alliance. | ||
|
||
|
||
OPEN SOURCE LICENSE | ||
|
||
This library is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU Lesser General Public | ||
License as published by the Free Software Foundation; either | ||
version 2.1 of the License, or (at your option) any later version. | ||
|
||
This library is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
Lesser General Public License for more details here. | ||
|
||
You should have received a copy of the GNU Lesser General Public | ||
License along with this library; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,28 @@ | ||
|
||
# Code Structure | ||
|
||
# /openstudio-standards | ||
|
||
The `openstudio-standards` gem code. | ||
|
||
## /data | ||
|
||
The raw data used by the library. Files in this directory should not contain code. | ||
|
||
### /geometry | ||
|
||
These files contain 3D building geometry that is often used as a starting point for prototypical models. | ||
These files contain 3D building geometry that is often used as a starting point for prototypical models. It also contains JSON files that describe the HVAC systems to be used with the geometry. | ||
|
||
### /standards | ||
|
||
These files contain information from energy codes/standards, as well as typical building characteristics. Examples include HVAC efficiency values, performance curves, construction U-values, and schedules. The code accesses this information when applying a standard or creating a prototypical building. | ||
|
||
Rather than editing the JSON files directly, developers should edit [The OpenStudio_Standards Google Spreadsheet](https://docs.google.com/spreadsheets/d/15-mlZrWbA4srtFHtWRP1dgPeuI5plFdjCb1B79fEukI/edit?usp=sharing) | ||
- To get edit access to this spreadsheet, contact <mailto:[email protected]>. | ||
|
||
### /weather | ||
|
||
These files contain weather information for representative locations. The `.epw` files contain typical annual weather data, the `.ddy` files contain design day information, and the `.stat` files contain a summary of the weather in that location. | ||
|
||
## /lib/openstudio-standards | ||
|
||
The functional code. | ||
The functional code that makes up this library. | ||
|
||
### /btap | ||
|
||
|
@@ -37,15 +34,15 @@ These files extend OpenStudio classes to allow users to run a sizing run and acc | |
|
||
### /prototypes | ||
|
||
These files extend OpenStudio classes to apply typical assumptions that are not governed by a standard, and for which reasonable values exist. For example, the configuration of the HVAC systems, assumptions for fan pressure drops, etc. These assumptions come from sources like the DOE Prototype, the DOE Reference Buildings, and the Canadian Archetype Buildings. | ||
These files apply typical assumptions that are not governed by a standard, and for which reasonable values exist. For example, the configuration of the HVAC systems, assumptions for fan pressure drops, etc. These assumptions come from sources like the DOE Prototype, the DOE Reference Buildings, and the Canadian Archetype Buildings. | ||
|
||
### /standards | ||
|
||
These files extend OpenStudio classes to enable them to modify their inputs to meet a specific standard. For example, the Chiller:Electric:EIR object has a new method that sets its COP and performance curves based on the selected standard, the capacity, and the compressor type. These methods rely on the information in the `/data/standards` directory for lookups. | ||
These files modify model inputs to meet a specific standard. For example, there is a method that modifies a Chiller:Electric:EIR and sets its COP and performance curves based on the selected standard, the capacity, and the compressor type. These methods rely on the information in the `/data/standards` directory for lookups. | ||
|
||
### /weather | ||
|
||
These files extend the OpenStudio classes to allow a model to import design days, pull water mains temperature from the .stat file, and assign the correct weather file to the model. | ||
These files import design days to models, pull water mains temperature from the .stat file, and assign the correct weather file to the model. | ||
|
||
## /test | ||
|
||
|
@@ -54,7 +51,3 @@ This directory contains unit tests which run various portions of the code and en | |
## docs | ||
|
||
This is where the documentation (like this very page) lives. Note that the code documentation is not here. Those pages are generated on-the-fly from the source code, and are not committed to the repository. | ||
|
||
# /measures | ||
|
||
Each folder in this directory contains an [OpenStudio Measure](http://nrel.github.io/OpenStudio-user-documentation/getting_started/about_measures/) that requires the `openstudio-standards` gem to operate correctly. When the tests for this repository are run, in addition to running the tests in the `/openstudio-standards/test` directory, it also runs the Measure-specific tests found in the `/MeasureName/tests` directory. Eventually, the tests for these Measures will be run by a dedicated Measure testing framework, but for now they are included in this repository to ensure that changes to the `openstudio-standards` gem do not break them. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# Developer Information | ||
# Really MUST BE UPDATED | ||
|
||
## Setup | ||
|
||
1. Install the [latest version of OpenStudio](https://www.openstudio.net/downloads) | ||
2. Install Ruby: | ||
1. **On Mac**: | ||
2. Ruby 2.2 is already installed, go to the next step. | ||
2. Install Ruby 2.2 using [rbenv](http://octopress.org/docs/setup/rbenv/) (`ruby -v` from command prompt to check installed version). | ||
3. **On Windows**: | ||
4. Install [Ruby 2.2.6](http://rubyinstaller.org/downloads/) (`ruby -v` from command prompt to check installed version). | ||
5. Install [Ruby DevKit](http://rubyinstaller.org/downloads/) by following [these installation instructions](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) | ||
|
@@ -17,9 +17,9 @@ | |
4. Save it here: `/usr/lib/ruby/site_ruby/openstudio.rb` | ||
5. **On Windows**: | ||
6. Create a file called `openstudio.rb` | ||
7. Contents: `require "C:/openstudio-2.1.0/Ruby/openstudio.so"` Modify `2.1.0` to the version you installed. | ||
7. Contents: `require "C:/openstudio-2.1.0/Ruby/openstudio.rb"` Modify `2.1.0` to the version you installed. | ||
8. Save it here: `C:/Ruby22-x64/lib/ruby/site_ruby/openstudio.rb` | ||
9. Start > right click Computer > Properties > Advanced system settings > Environment variables. In the User variables section (top) add a new Variable with the name `GEM_PATH` and the Value `C:\Ruby22-x64\lib\ruby\gems\2.0.0`. | ||
9. Start > right click Computer > Properties > Advanced system settings > Environment variables. In the User variables section (top) add a new Variable with the name `GEM_PATH` and the Value `C:\Ruby22-x64\lib\ruby\gems\2.2.0`. | ||
|
||
5. Install the `bundler` ruby gem. (`gem install bundler` from command prompt) | ||
6. Install the `json` ruby gem. (`gem install json` from command prompt) | ||
|
@@ -29,7 +29,7 @@ | |
9. Run all commands below from the `/openstudio-standards/openstudio-standards` directory | ||
10. **On Windows**, use the Git Bash instead of the default command prompt. | ||
11. **On Mac** the default terminal is fine. | ||
11. Navigate to the `openstudio-standards/openstudio-standards` directory. | ||
11. Navigate to the `openstudio-standards` directory. | ||
12. Command prompt: `bundle install`. This will install all ruby gems necessary to develop this code. | ||
13. Sign up for an account at [CircleCI](https://circleci.com/) and follow the `NREL/openstudio-standards` project. | ||
14. That's it, you are ready to make changes! | ||
|
@@ -61,6 +61,7 @@ This project uses [Rake](http://rake.rubyforge.org/) to run tasks from the termi | |
- `rake install:local`: installs the gem locally | ||
- `rake release`: pushes the code to RubyGems.org. Don't use this without asking! | ||
- `rake rubocop`: checks the code syntax | ||
- `rake rubocop`: checks the code syntax and shows the report | ||
- `rake rubocop:auto_correct`: fixes mistakes in code syntax | ||
- `rake test:compliance`: runs tests for NECB compliance (Canadian) | ||
- `rake test:necb-buildings`: runs tests for NECB buildings (Canadian) | ||
|
@@ -69,11 +70,12 @@ This project uses [Rake](http://rake.rubyforge.org/) to run tasks from the termi | |
|
||
### Modify the code | ||
|
||
As you add to/modify the code, please try to fit changes into the current structure rather than bolting things on willy-nilly. See the {file:openstudio-standards/docs/CodeStructure.md Code Structure page} to see how the code is organized. If you don't understand something or want to discuss your plan before you get started, contact {mailto:[email protected]}. | ||
As you add to/modify the code, please try to fit changes into the current structure rather than bolting things on willy-nilly. See the {file:docs/CodeStructure.md Code Structure page} to see how the code is organized. If you don't understand something or want to discuss your plan before you get started, contact <mailto:[email protected]>. | ||
|
||
1. Make a new branch for your changes. | ||
2. Modify the code on your branch. | ||
3. Modify the [OpenStudio_Standards Google Spreadsheet](https://docs.google.com/spreadsheets/d/15-mlZrWbA4srtFHtWRP1dgPeuI5plFdjCb1B79fEukI/edit?usp=sharing) | ||
- To get edit access to this spreadsheet, contact <mailto:[email protected]>. | ||
4. `rake data:update` to download the latest version of the spreadsheet from Google Drive and export the JSON files. | ||
|
||
### Test the code | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Architecture | ||
# Features | ||
|
||
This library has been developed with three main use-cases in mind: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# OpenStudio-Standards | ||
|
||
**Unit Test Status:** [](https://circleci.com/gh/NREL/openstudio-standards/tree/master) | ||
|
||
This library (a Ruby Gem) is an extension of the {https://www.openstudio.net/ OpenStudio SDK} with three main use-cases: | ||
|
||
1. Create the DOE Prototype Buildings in OpenStudio format | ||
2. Create a code baseline model from a proposed model | ||
3. Check a model against a code/standard (not yet implemented) | ||
|
||
## Overview of Main Features | ||
If you are looking for a high-level overview of the features of this library, see the {file:docs/Features.md Features page}. | ||
|
||
## User Quick Start Guide | ||
|
||
If you are a user, see the {file:docs/UserQuickStartGuide.md User Quick Start Guide} | ||
|
||
## Developer Information | ||
|
||
If you are a developer looking to get started, see the {file:docs/DeveloperInformation.md Developer Information page}. | ||
|
||
If you are a developer that wants to add a Standard/Template, see the {file:docs/AddingAStandard.md Adding a Standard page}. | ||
|
||
For an overview of the repository structure, see the {file:docs/CodeStructure.md Code Structure page}. |
Oops, something went wrong.