Skip to content

Commit

Permalink
Merge branch 'latest-os-hpxml' of https://github.com/NREL/OpenStudio-ERI
Browse files Browse the repository at this point in the history
 into diagnostic_output3

# Conflicts:
#	Gemfile.lock
#	workflow/tests/base_results/real_homes.csv
  • Loading branch information
shorowit committed May 19, 2024
2 parents 3fd0963 + 9e88040 commit 3c6cd5a
Show file tree
Hide file tree
Showing 788 changed files with 32,204 additions and 16,776 deletions.
61 changes: 43 additions & 18 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
run-ruleset-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.7.0
image: docker://nrel/openstudio:3.8.0-rc3
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
run-sample-files1-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.7.0
image: docker://nrel/openstudio:3.8.0-rc3
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -85,7 +85,7 @@ jobs:
run-sample-files2-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.7.0
image: docker://nrel/openstudio:3.8.0-rc3
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -108,7 +108,7 @@ jobs:
run-real-home-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.7.0
image: docker://nrel/openstudio:3.8.0-rc3
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -131,7 +131,7 @@ jobs:
run-other-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:3.7.0
image: docker://nrel/openstudio:3.8.0-rc3
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -160,8 +160,8 @@ jobs:
- name: Install software and run test
shell: pwsh
run: |
$env:OS_VERSION="3.7.0"
$env:OS_SHA="d5269793f1"
$env:OS_VERSION="3.8.0-rc3"
$env:OS_SHA="d8eac889d0"
Invoke-WebRequest -OutFile Windows.tar.gz -URI "https://github.com/NREL/OpenStudio/releases/download/v${env:OS_VERSION}/OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows.tar.gz"
tar -xzf Windows.tar.gz
& .\OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows\bin\openstudio.exe workflow\energy_rating_index.rb -x workflow\sample_files\base.xml --daily ALL --add-component-loads --diagnostic-output
Expand All @@ -170,12 +170,37 @@ jobs:
runs-on: ubuntu-latest
needs: [run-sample-files1-tests, run-sample-files2-tests, run-real-home-tests, run-other-tests]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Download all results
uses: actions/download-artifact@v4
with:
name: results
path: test_results
pattern: test_results_*
delete-merged: true
merge-multiple: true

- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: test_results_*

- name: Merge results
run: |
mkdir workflow/tests/test_results
cp -r test_results/*.csv workflow/tests/test_results
cd workflow/tests
pip install pandas
python ../../hpxml-measures/workflow/tests/merge.py test_results/sample_files1.csv test_results/sample_files2.csv test_results/sample_files.csv
rm test_results/sample_files1.csv
rm test_results/sample_files2.csv
- name: Store results
uses: actions/upload-artifact@v4
with:
path: workflow/tests/test_results
name: test_results

compare-results:
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -205,14 +230,14 @@ jobs:
- name: Download feature results
uses: actions/download-artifact@v4
with:
path: results
name: results
path: test_results
name: test_results

- name: Compare results
run: |
cp -r base_results/*.csv workflow/tests/base_results
mkdir workflow/tests/results
cp -r results/*.csv workflow/tests/results
mkdir workflow/tests/test_results
cp -r test_results/*.csv workflow/tests/test_results
pip install numpy
pip install pandas
Expand All @@ -239,15 +264,15 @@ jobs:
- name: Download feature results
uses: actions/download-artifact@v4
with:
path: results
name: results
path: test_results
name: test_results

- name: Commit latest results
shell: bash
run: |
branch_name="${{ github.head_ref }}"
git pull origin $branch_name
cp -r results/*.csv workflow/tests/base_results
cp -r test_results/*.csv workflow/tests/base_results
git add workflow/tests/base_results
git status
if [[ $(git diff --cached --exit-code) ]]; then
Expand Down
114 changes: 113 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Gemspec/DateAssignment:
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Layout/SpaceBeforeBrackets:
Enabled: true
Expand Down Expand Up @@ -72,4 +72,116 @@ Style/RedundantArgument:
Style/StringChars:
Enabled: true
Style/SwapValues:
Enabled: true
Gemspec/DevelopmentDependencies: # new in 1.44
Enabled: true
Gemspec/RequireMFA: # new in 1.23
Enabled: true
Layout/LineContinuationLeadingSpace: # new in 1.31
Enabled: true
Layout/LineContinuationSpacing: # new in 1.31
Enabled: true
Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: true
Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: true
Lint/AmbiguousRange: # new in 1.19
Enabled: true
Lint/ConstantOverwrittenInRescue: # new in 1.31
Enabled: true
Lint/DuplicateMagicComment: # new in 1.37
Enabled: true
Lint/DuplicateMatchPattern: # new in 1.50
Enabled: true
Lint/EmptyInPattern: # new in 1.16
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: true
Lint/NonAtomicFileOperation: # new in 1.31
Enabled: true
Lint/RefinementImportMethods: # new in 1.27
Enabled: true
Lint/RequireRangeParentheses: # new in 1.32
Enabled: true
Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: true
Lint/UselessRescue: # new in 1.43
Enabled: true
Lint/UselessRuby2Keywords: # new in 1.23
Enabled: true
Metrics/CollectionLiteralLength: # new in 1.47
Enabled: true
Naming/BlockForwarding: # new in 1.24
Enabled: true
Security/CompoundHash: # new in 1.28
Enabled: true
Security/IoMethods: # new in 1.22
Enabled: true
Style/ArrayIntersect: # new in 1.40
Enabled: true
Style/ComparableClamp: # new in 1.44
Enabled: true
Style/ConcatArrayLiterals: # new in 1.41
Enabled: true
Style/DataInheritance: # new in 1.49
Enabled: true
Style/DirEmpty: # new in 1.48
Enabled: true
Style/EmptyHeredoc: # new in 1.32
Enabled: true
Style/EnvHome: # new in 1.29
Enabled: true
Style/FetchEnvVar: # new in 1.28
Enabled: true
Style/FileEmpty: # new in 1.48
Enabled: true
Style/FileRead: # new in 1.24
Enabled: true
Style/FileWrite: # new in 1.24
Enabled: true
Style/InPatternThen: # new in 1.16
Enabled: true
Style/MagicCommentFormat: # new in 1.35
Enabled: true
Style/MapCompactWithConditionalBlock: # new in 1.30
Enabled: true
Style/MapToHash: # new in 1.24
Enabled: true
Style/MapToSet: # new in 1.42
Enabled: true
Style/MinMaxComparison: # new in 1.42
Enabled: true
Style/MultilineInPatternThen: # new in 1.16
Enabled: true
Style/NestedFileDirname: # new in 1.26
Enabled: true
Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/ObjectThen: # new in 1.28
Enabled: true
Style/OpenStructUse: # new in 1.23
Enabled: true
Style/OperatorMethodCall: # new in 1.37
Enabled: true
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantConstantBase: # new in 1.40
Enabled: true
Style/RedundantDoubleSplatHashBraces: # new in 1.41
Enabled: true
Style/RedundantEach: # new in 1.38
Enabled: true
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
Enabled: true
Style/RedundantInitialize: # new in 1.27
Enabled: true
Style/RedundantLineContinuation: # new in 1.49
Enabled: true
Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: true
Style/RedundantStringEscape: # new in 1.37
Enabled: true
Style/SelectByRegexp: # new in 1.22
Enabled: true
22 changes: 16 additions & 6 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
## OpenStudio-ERI v1.8.0

__New Features__
- Updates to OpenStudio 3.8, EnergyPlus 24.1, HPXML 4.0-rc4.
- Implements ANSI/RESNET/ICC Standard 301-2022 and Addendum C.
- **Breaking change**: For shared water heaters, `NumberofUnitsServed` is replaced by `extension/NumberofBedroomsServed`.
- **Breaking change**: For shared hot water recirculation systems, `NumberofUnitsServed` is replaced by `NumberofBedroomsServed`.
- `ERICalculation/Version` and `CO2IndexCalculation/Version` can now be "2022C" or "2022".
- Allows modeling electric battery storage, including shared batteries ("2022C" or newer).
- The `ElectricAuxiliaryEnergy` input for boilers is no longer used.
- **Breaking change**: ERI_Results.csv and ERI_Worksheet.csv combined into a single ERI_Results.csv that better reflects the current ERI calculation components; additional fields (e.g., PEfrac) added and a few renamed/removed.
- **Breaking change**: Skylights attached to roofs of attics (e.g., with shafts or sun tunnels) must include the `Skylight/AttachedToFloor` element.
- **Breaking change**: Each `VentilationFan` must have one (and only one) `UsedFor...` element set to true.
- HERS software tests:
- HERS Hot Water test HPXMLs have been updated to be direct EnergyPlus simulations (like the HERS HVAC & DSE tests already were); they are no longer run through ERI simulations.
- HERS HVAC DSE tests now use duct effective R-values instead of nominal insulation R-values to demonstrate that they pass RESNET acceptance criteria.
- Allows `AverageCeilingHeight` to be optionally provided for infiltration calculations.
- Ground source heat pump model enhancements.
- Allows `Roof/RadiantBarrier` to be omitted; defaults to false.
- Adds optional `Slab/extension/GapInsulationRValue` input for cases where a slab has horizontal (under slab) insulation.
- Adds more error-checking for inappropriate inputs (e.g., HVAC SHR=0 or clothes washer IMEF=0).
- Allows `FractionDuctArea` as alternative to `DuctSurfaceArea`
- Allows alternative `LabelEnergyUse` (W) input for ceiling fans.
- Allows `Slab/extension/GapInsulationRValue` input for cases where a slab has horizontal (under slab) insulation.
- Ground source heat pump model enhancements.
- Improves heating/cooling component loads.
- Now defaults to -20F for `CompressorLockoutTemperature` for variable-speed air-to-air heat pumps.
- Clarifies that Capacity=-1 can be used to autosize HVAC equipment for research purposes or to run tests.
- It should *not* be used for a real home; a warning will be issued when it's used.
- Allow alternative label energy use (W) input for ceiling fans.
- Adds more error-checking for inappropriate inputs (e.g., HVAC SHR=0 or clothes washer IMEF=0).
- Clarifies that HVAC `Capacity=-1` can be used to autosize HVAC equipment for research purposes or to run tests. It should *not* be used for a real home, and a warning will be issued when it's used.

__Bugfixes__
- Fixes incorrect Reference Home mechanical ventilation flowrate for attached units (when Aext is not 1).
- Fixes possible 301ruleset.rb error due to floating point arithmetic.

## OpenStudio-ERI v1.7.1

__Bugfixes__
- Fixes emissions lookup when zip code starts with a zero.

## OpenStudio-ERI v1.7.0

__New Features__
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ source 'http://rubygems.org'

gem 'oga'
gem 'rake'
gem 'matrix'
gem 'minitest', '~> 5.9'
gem 'minitest-reporters'
gem 'msgpack'
Expand Down
28 changes: 12 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,44 +1,40 @@
GEM
remote: http://rubygems.org/
specs:
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ansi (1.5.0)
ast (2.4.2)
builder (3.2.4)
docile (1.4.0)
json-schema (4.3.0)
addressable (>= 2.8)
minitest (5.22.3)
minitest-reporters (1.6.1)
matrix (0.4.2)
minitest (5.15.0)
minitest-reporters (1.5.0)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
msgpack (1.7.2)
oga (3.4)
msgpack (1.5.1)
oga (3.3)
ast
ruby-ll (~> 2.1)
parallel (1.24.0)
public_suffix (5.0.5)
rake (13.2.1)
ruby-ll (2.1.3)
rake (13.0.6)
ruby-ll (2.1.2)
ansi
ast
ruby-progressbar (1.13.0)
ruby-progressbar (1.11.0)
rubyzip (2.3.2)
simplecov (0.22.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)

PLATFORMS
x86_64-linux
ruby

DEPENDENCIES
json-schema
matrix
minitest (~> 5.9)
minitest-reporters
msgpack
Expand All @@ -50,4 +46,4 @@ DEPENDENCIES
simplecov-html

BUNDLED WITH
2.4.7
2.1.4
Loading

0 comments on commit 3c6cd5a

Please sign in to comment.