Skip to content

Commit

Permalink
Merge pull request #535 from NREL/develop
Browse files Browse the repository at this point in the history
v2.4.0 release
  • Loading branch information
joseph-robertson committed Jan 27, 2021
2 parents 15447ca + ed7d523 commit bf0bbb7
Show file tree
Hide file tree
Showing 340 changed files with 745,735 additions and 552,646 deletions.
65 changes: 0 additions & 65 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Not all may apply:
- [ ] Any new options are added to `project_testing`
- [ ] `project_testing` runs without any failures
- [ ] No unexpected regression test changes
- [ ] All tests are passing (green) on circleci
- [ ] All tests are passing
- [ ] The [changelog](https://github.com/NREL/resstock/blob/master/CHANGELOG.md) has been updated appropriately
- [ ] This branch is up-to-date with master
- [ ] This branch is up-to-date with develop

For more information on how to perform these checklist items, see the documentation's [Advanced Tutorial](https://resstock.readthedocs.io/en/latest/advanced_tutorial/index.html).
98 changes: 98 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# This is a basic workflow to help you get started with Actions

name: ci

# Controls when the action will run.
on: [push]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:2.9.0

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install gems
run: |
rm -f Gemfile.lock && bundle install
- name: Apply rubocop
run: |
rubocop --format simple --only Layout --debug
- name: Update all measures
run: |
rake update_measures
- name: Regenerate test osms
run: |
rake test:regenerate_osms
- name: Run all unit tests
run: |
rake test:unit_tests
- name: Run all regression tests
run: |
rake test:regression_tests
- name: Store example osws
uses: actions/upload-artifact@v2
with:
path: workflows/results/results.csv
name: example_osws.csv

- name: Store measures osws
uses: actions/upload-artifact@v2
with:
path: test/test_measures_osw/results/results.csv
name: measures_osws.csv

- name: Store buildstock csv
uses: actions/upload-artifact@v2
with:
path: test/test_measures_osw/buildstock.csv
name: buildstock.csv

- name: Store schedules
uses: actions/upload-artifact@v2
with:
path: resources/measures/ResidentialScheduleGenerator/tests/output/test_sweep_building_ids_and_num_occupants
name: schedules

docs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
python-version: [3.8.4]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Build documentation
run: |
cd docs/read_the_docs
pip install -r requirements.txt
make html
- name: Store docs
uses: actions/upload-artifact@v2
with:
path: docs/read_the_docs/build
name: readthedocs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ coverage
/download_files.rb
.DS_Store
.idea/*.*
.vscode
/run
/test/osw_files/out.osw
/test/osw_files/run
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## ResStock v2.4.0 (pending)
## ResStock v2.4.0
###### January 27, 2021 - [Diff](https://github.com/NREL/OpenStudio-BuildStock/compare/v2.3.0...v2.4.0)

Features
- Report the annual peak use and timing using the quantities of interest measure ([#458](https://github.com/NREL/resstock/pull/458))
Expand All @@ -13,6 +14,10 @@ Features
- Update Occupants per unit from RECS 2015 to PUMS 5-yr 2017 ([#509](https://github.com/NREL/resstock/pull/509]))
- Allow for plug load energy consumption to vary by Census Division and include additional "diversity" multiplier in plug load equations ([#511](https://github.com/NREL/resstock/pull/511))
- Lighting saturations based on RECS 2015 with new building type and spatial dependencies ([#510](https://github.com/NREL/resstock/pull/510]))
- Introduce premium water heaters and heat pump water heats into building stock, differentiate between central and in unit water heating, and split water heater fuel and efficiency into different housing characteristics ([#513](https://github.com/NREL/resstock/pull/513))
- Separate electric supplemental heating from total electric heating in output reporting ([#512](https://github.com/NREL/OpenStudio-BuildStock/pull/512))
- Update the duct leakage "total" to "to outside" conversion to be based on ASHRAE Standard 152 ([#532](https://github.com/NREL/resstock/pull/532))
- Allow for flexible weather regions based on weather data available and introduce TMY3 weather files for the new weather format ([#525](https://github.com/NREL/resstock/pull/525))

Fixes
- Based on RECS 2015, separate the plug load equations for single-family detached, single-family attached, and multifamily buildings ([#471](https://github.com/NREL/resstock/pull/471))
Expand All @@ -23,6 +28,13 @@ Fixes
- For the purpose of calculating cooling and dehumidification loads for HVAC sizing, use simple internal gains equation from ANSI/RESNET/ICC 301 (consistent with HPXML workflow); this fixes a bug introduced in [#348](https://github.com/NREL/resstock/pull/348) that caused cooling capacities to be ~3x larger than they should be ([#501](https://github.com/NREL/resstock/pull/501))
- Reintroduce IECC climate zone dependency to HVAC Cooling Type and some heat pump fixes ([#497](https://github.com/NREL/resstock/pull/497))
- Reintroduce monthly multipliers with stochastic load model for dishwasher, clothes washer and clothes dryer and cooking ([#504](https://github.com/NREL/resstock/pull/504))
- Account for collapsed units when determining geometry variables (building floor/wall area and volume) in infiltration calculations; add airflow unit tests ([#518](https://github.com/NREL/resstock/pull/518))
- Fix for calculating door and below-grade wall area of multifamily and single-family attached buildings with collapsed geometries ([#523](https://github.com/NREL/resstock/pull/523))
- In the Corridor.tsv, assign single-family attached, single-family detached, and mobile homes with a "Not Applicable" option ([#502](https://github.com/NREL/resstock/pull/522))
- Remove ceiling fan energy for vacant units ([#527](https://github.com/NREL/resstock/pull/527))
- Fix bug related to incorrect timestamps when using AMY weather file ([#528](https://github.com/NREL/resstock/pull/528))
- Fix DST start hour error and end date error ([#530](https://github.com/NREL/resstock/pull/530))
- Calculate slab surface effective R values used in HVAC sizing with unit-level variables ([#537](https://github.com/NREL/resstock/pull/537))

## ResStock v2.3.0
###### June 24, 2020 - [Diff](https://github.com/NREL/resstock/compare/v2.2.4...v2.3.0)
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ gem 'ci_reporter_minitest', '~> 1.0.0'
gem 'simplecov', '~> 0.17.1'
gem 'simplecov-html', '~> 0.10.0'
gem 'minitest-reporters'
gem 'minitest-ci', :git => 'https://github.com/circleci/minitest-ci.git' # For CircleCI Automatic test metadata collection
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The `develop` branch is under active development. Find the latest release [here](https://github.com/NREL/resstock/releases).

[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/NREL/resstock?include_prereleases)](https://github.com/NREL/resstock/releases)
[![CircleCI](https://circleci.com/gh/NREL/resstock.svg?style=shield)](https://circleci.com/gh/NREL/resstock)
[![ci](https://github.com/NREL/resstock/workflows/ci/badge.svg)](https://github.com/NREL/resstock/actions)
[![Documentation Status](https://readthedocs.org/projects/resstock/badge/?version=latest)](https://resstock.readthedocs.io/en/latest/?badge=latest)

[ResStock™](https://www.nrel.gov/buildings/resstock.html), built on the [OpenStudio platform](http://openstudio.net), is a project geared at modeling existing residential building stocks at national, regional, or local scales with a high-degree of granularity (e.g., one physics-based simulation model for every 200 dwelling units), using the [EnergyPlus simulation engine](http://energyplus.net). Information about ComStock™, a sister tool for modeling the commercial building stock, can be found [here](https://www.nrel.gov/buildings/comstock.html).
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def regenerate_osms
File.open(osm, 'w') { |f| f << model.to_s }

# Add auto-generated message to top of file
# Update EPW file paths to be relative for the CircleCI machine
# Update EPW file paths to be relative for the ci machine
file_text = File.readlines(osm)
File.open(osm, "w") do |f|
f.write("!- NOTE: Auto-generated from #{osw.gsub(File.dirname(__FILE__), "")}\n")
Expand Down Expand Up @@ -275,7 +275,7 @@ def integrity_check(project_dir_name, housing_characteristics_dir = "housing_cha
# Check dependency value combination
_matched_option_name, _matched_row_num = tsvfile.get_option_name_from_sample_number(1.0, combo_hash)

# Print to screen so CircleCI does not timeout
# Print to screen so ci does not timeout
if i % 10000 == 0
puts " Checked #{i}/#{total_hashes} possible dependency value combinations..."
end
Expand Down
2 changes: 1 addition & 1 deletion __version__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__title__ = 'ResStock'
__description__ = 'Modeling the existing building stock (residential and commercial) using OpenStudio/EnergyPlus.'
__url__ = 'http://github.com/NREL/resstock'
__version__ = '2.3.0'
__version__ = '2.4.0'
__author__ = 'National Renewable Energy Laboratory'
__license__ = 'BSD-3'
__copyright__ = 'Copyright (c) 2016-2019, Alliance for Sustainable Energy, LLC.'
6 changes: 3 additions & 3 deletions measures/BuildExistingModel/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<schema_version>3.0</schema_version>
<name>build_existing_model</name>
<uid>dedf59bb-3b88-4f16-8755-2c1ff5519cbf</uid>
<version_id>d844b57f-2ddf-4849-8044-b69e2cf2411b</version_id>
<version_modified>20201105T190355Z</version_modified>
<version_id>589f537a-de41-4f1c-8997-86951e87356a</version_id>
<version_modified>20201209T001937Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildExistingModel</class_name>
<display_name>Build Existing Model</display_name>
Expand Down Expand Up @@ -81,7 +81,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>30622105</checksum>
<checksum>F22ACF6E</checksum>
</file>
</files>
</measure>
58 changes: 41 additions & 17 deletions measures/SimulationOutputReport/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,14 @@ def run(runner, user_arguments)
# Load buildstock_file
resources_dir = File.absolute_path(File.join(File.dirname(__FILE__), "..", "..", "lib", "resources")) # Should have been uploaded per 'Other Library Files' in analysis spreadsheet
buildstock_file = File.join(resources_dir, "buildstock.rb")
require File.join(File.dirname(buildstock_file), File.basename(buildstock_file, File.extname(buildstock_file)))

if File.exists? buildstock_file
require File.join(File.dirname(buildstock_file), File.basename(buildstock_file, File.extname(buildstock_file)))
else
# Use buildstock.rb in /resources if running locally
resources_dir = File.absolute_path(File.join(File.dirname(__FILE__), "../../resources/"))
buildstock_file = File.join(resources_dir, "buildstock.rb")
require File.join(File.dirname(buildstock_file), File.basename(buildstock_file, File.extname(buildstock_file)))
end
total_site_units = "MBtu"
elec_site_units = "kWh"
gas_site_units = "therm"
Expand All @@ -151,6 +157,7 @@ def run(runner, user_arguments)
report_sim_output(runner, "total_site_electricity_kwh", electricity.total_end_uses[0] + electricity.photovoltaics[0], "GJ", elec_site_units)
report_sim_output(runner, "electricity_heating_kwh", electricity.heating[0], "GJ", elec_site_units)
report_sim_output(runner, "electricity_central_system_heating_kwh", electricity.central_heating[0], "GJ", elec_site_units)
report_sim_output(runner, "electricity_heating_supplemental_kwh", electricity.heating_supplemental[0], "GJ", elec_site_units)
report_sim_output(runner, "electricity_cooling_kwh", electricity.cooling[0], "GJ", elec_site_units)
report_sim_output(runner, "electricity_central_system_cooling_kwh", electricity.central_cooling[0], "GJ", elec_site_units)
report_sim_output(runner, "electricity_interior_lighting_kwh", electricity.interior_lighting[0], "GJ", elec_site_units)
Expand Down Expand Up @@ -770,16 +777,6 @@ def get_cost_multiplier(cost_mult_type, model, runner)

cost_mult += UnitConversions.convert(surface.grossArea, "m^2", "ft^2")
end

elsif cost_mult_type == "Wall Area, Below-Grade (ft^2)"
# Walls adjacent to ground
space.surfaces.each do |surface|
next if surface.surfaceType.downcase != "wall"
next if surface.outsideBoundaryCondition.downcase != "ground" and surface.outsideBoundaryCondition.downcase != "foundation"

cost_mult += UnitConversions.convert(surface.grossArea, "m^2", "ft^2")
end

elsif cost_mult_type == "Floor Area, Conditioned (ft^2)"
# Floors of conditioned zone
space.surfaces.each do |surface|
Expand Down Expand Up @@ -897,14 +894,41 @@ def get_cost_multiplier(cost_mult_type, model, runner)
end

elsif cost_mult_type == "Wall Area, Below-Grade (ft^2)"
# Walls adjacent to ground
foundation_walls = []

# Exterior foundation walls
model.getSurfaces.each do |surface|
space = surface.space.get
next if space.buildingUnit.is_initialized
next if surface.surfaceType.downcase != "wall"
next if surface.outsideBoundaryCondition.downcase != "ground" and surface.outsideBoundaryCondition.downcase != "foundation"

cost_mult += UnitConversions.convert(surface.grossArea, "m^2", "ft^2") * collapsed_factor
foundation_walls << surface
# Collapsed foundation wall area (walls below units + corridor)
cost_mult += UnitConversions.convert(surface.grossArea, "m^2", "ft^2")
end

model.getSurfaces.each do |surface|
space = surface.space.get
next if surface.surfaceType.downcase != "floor"
next if surface.outsideBoundaryCondition.downcase == "ground" or surface.outsideBoundaryCondition.downcase == "foundation"
next if space.zOrigin != 0

floor_surface = surface

units_represented = 1
if space.buildingUnit.is_initialized
unit = space.buildingUnit.get
if unit.additionalProperties.getFeatureAsInteger("Units Represented").is_initialized
units_represented = unit.additionalProperties.getFeatureAsInteger("Units Represented").get
end
end

next if units_represented <= 1 # Walls under collapsed units are already added

connected_found_walls = Geometry.get_walls_connected_to_floor(foundation_walls, floor_surface, same_space = false)
connected_found_walls.each do |surface|
# Add the collapsed walls below units
cost_mult += UnitConversions.convert(surface.grossArea, "m^2", "ft^2") * (units_represented - 1)
end
end

elsif cost_mult_type == "Floor Area, Conditioned (ft^2)"
Expand Down Expand Up @@ -984,7 +1008,7 @@ def get_cost_multiplier(cost_mult_type, model, runner)
surface.subSurfaces.each do |sub_surface|
next if not sub_surface.subSurfaceType.downcase.include? "door"

cost_mult += UnitConversions.convert(sub_surface.grossArea, "m^2", "ft^2")
cost_mult += UnitConversions.convert(sub_surface.grossArea, "m^2", "ft^2") * collapsed_factor
end
end

Expand Down

0 comments on commit bf0bbb7

Please sign in to comment.