[go: up one dir, main page]

Skip to content
/ ComStock Public

National scale modeling of the U.S. commercial building stock supported by U.S. DOE, LADWP, and others and maintained by NREL

License

Notifications You must be signed in to change notification settings

NREL/ComStock

Repository files navigation

ComStock

ComStock is an NREL model of the U.S. commercial building stock. The model takes some building characteristics from the U.S. Department of Energy's (DOE's) Commercial Prototype Building Models and Commercial Reference Building. However, unlike many other building stock models, ComStock also combines these with a variety of additional public- and private-sector data sets. Collectively, this information provides high-fidelity building stock representation with a realistic diversity of building characteristics.

This repository contains the source code used to build and execute ComStock models, including upgrade scenarios. In addition, the sampling of buildings characteristics used for the initial ComStock (V1.0) release is provided. The ComStock model is under active calibration and development, which is publicly visible on this repository.

Execution of the ComStock workflow is managed through the buildstockbatch repository, a shared asset of ResStock and ComStock, specifically developed to scale to execution of tens of millions of simulations through multiple infrastructure providers.

The dataset output from the initial ComStock (V1.0) release can be found at the accompanying ComStock data viewer website and additional information about ComStock found on the NREL Buildings Website. For more details about ongoing model development please consult the End Use Load Profiles website.

ComStock is a direct result of the NREL residential stock modeling tool ResStock (recipient of a R&D100 award) and was inspired by the high-fidelity solar & storage adoption model dGen. Additionally, this tool would not be possible without the decades of work undertaken by the OpenStudio and EnergyPlus visionaries and contributors, significant funding, feedback and support from the Los Angeles Department of Water and Power, and the Department of Energy's Building Technology Office ongoing support of and investment in building energy modeling software.

Directories

  • /build contains instructions for building Apptainer images for running ComStock on HPC systems.
  • /documentation contains LaTeX documentation and instructions for building the documentation.
  • /measures contains the high-level "meta" measures used to call other measures, and the reporting measures used to summarize outputs.
  • /national contains seed directories necessary for a ComStock run using buildstockbatch.
  • /postprocessing contains postprocessing scripts to create graphics for viewing results and comparing to other data sources.
  • /resources contains workflow and upgrade measures
  • /samples contains sample buildstock.csv files, which describe the set of models included in a run.
  • /sampling contains instructions and code to generate buildstock.csv files.
  • /ymls contains sample .yml files, which are the configuration files used to execture a ComStock run with buildstockbatch.

Usage

ComStock is under an open source license. See LICENSE.txt in this directory. You are welcome to use this repository for your own use. However, we do not provide technical support. Please refer to our technical assistance documentation instead. We strongly suggest and support using the public datasets instead of attempting to run millions of building energy models yourself.

Developer Installation

This is needed if you are a developer making changes to openstudio-standards or openstudio-geb gems or are running simulations locally using BuildStock Batch.

  1. Install the latest version of OpenStudio. ComStock requires OpenStudio 3.8.0 or newer.

  2. Install the Ruby version that corresponds to your OpenStudio install. See the OpenStudio SDK Version Compatibility Matrix.

    1. On Mac:
    2. Install Ruby 3.2.2 using rbenv (ruby -v from command prompt to check installed version).
    3. On Windows:
    4. Install Ruby+Devkit 3.2.2 (ruby -v from command prompt to check installed version).
  3. Connect Ruby to OpenStudio:

    1. On Mac:
    2. Create a file called openstudio.rb
    3. Contents: require "/Applications/openstudio-3.8.0/Ruby/openstudio.rb" Modify 3.8.0 to the version you installed.
    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-3.8.0/Ruby/openstudio.rb" Modify 3.8.0 to the version you installed.
    8. Save it here: C:/Ruby32-x64/lib/ruby/site_ruby/openstudio.rb
  4. gem install bundler This installs the bundler ruby gem.

  5. Install Git.

  6. Install GitHub desktop or another GUI that makes Git easier to use.

  7. Clone the ComStock source code using GitHub desktop (easier) or Git (harder).

  8. Run all commands below from the top level /ComStock directory

  9. mkdir .custom_gems This makes a temp directory to install required gems inside.

  10. copy /Y .\resources\Gemfile .\.custom_gems\Gemfile This copies the Gemfile to the temp directory.

  11. gem install bundler:2.4.10 This installs the version of bundler needed by OpenStudio.

  12. bundle _2.4.10_ install --path "C:/GitRepos/ComStock/.custom_gems" --gemfile "C:/GitRepos/ComStock/.custom_gems/Gemfile" --without test This will install all ruby gems necessary to develop this code.

  13. If running simulations locally, install BuildStock Batch

  14. Add the following additional Python packages into your buildstockbatch environment:

conda activate buildstockbatch
pip install GHEDesigner==1.0
pip install NREL-PySAM==4.2.0

Measure Tests

  1. Follow the developer installation instructions above. In particular, GHEDesigner==1.0 must be installed with pip install GHEDesigner==1.0.
  2. Run the measure tests with the rake command:
  • bundle exec rake unit_tests:all_tests to run all measure tests.
  • bundle exec rake unit_tests:reporting_measure_tests to run all reporting measure tests.
  • bundle exec rake unit_tests:workflow_measure_tests to run all workflow measure tests.
    • bundle exec rake unit_tests:upgrade_measure_tests to run all upgrade_ measure tests.

Running Rubocop

  1. Follow the developer installation instructions above
  2. navigate to the .custom_gems directory
  3. run bundle exec rake rubocop:show in terminal
  4. review results by opening the rubocop-results.html in the .rubocop/ directory

About

National scale modeling of the U.S. commercial building stock supported by U.S. DOE, LADWP, and others and maintained by NREL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages