Skip to content

Conversation

amirroth
Copy link
Collaborator

@amirroth amirroth commented Apr 11, 2025

Pull request overview

This PR fixes #11030 (yes, I created the fix before reporting the issue).

The fix is simple. The Reheat Coil needs to be stored via GetCoilIndex when the AirTerminal object is created. Simply validating that that the coil exists via ValidateComponent is not enough (ValidateComponent needs to go but that is a story for a different day).

There are a few diffs. In addition to the expected desired diff of reported reheat coil multipliers, there are now ordering diffs in RDD, MDD, MTR, BND, EIO and a number of other files because objects are being created in different orders than they used to be (GetCoilIndex actually reads coil inputs and creates coil objects whereas ValidateComponent does not).

@amirroth amirroth added the Defect Includes code to repair a defect in EnergyPlus label Apr 11, 2025
@amirroth amirroth added this to the EnergyPlus 25.2 milestone Apr 11, 2025
@amirroth amirroth linked an issue Apr 11, 2025 that may be closed by this pull request
Copy link

⚠️ Regressions detected on macos-14 for commit a904fb8

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • Table String Diffs: 114
  • MDD: 2
  • MTR Small Diffs: 2
  • ESO Small Diffs: 1

Copy link
Collaborator Author

@amirroth amirroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rare commit (for me) that actually adds code, but that will be corrected in the CoilAPI refactor PR.

if (IsNotOK) {
ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the changes. They occur in about four different places.

if (IsNotOK) {
ShowContinueError(state, format("In {} = {}", airTerm.sysType, airTerm.SysName));
ErrorsFound = true;
if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here they are again.

Copy link

⚠️ Regressions detected on macos-14 for commit 948a4e4

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • Table String Diffs: 114
  • MDD: 2
  • MTR Small Diffs: 2
  • ESO Small Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit 9af570c

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • MDD: 2
  • MTR Small Diffs: 2
  • Table String Diffs: 1
  • ESO Small Diffs: 1

@rraustad
Copy link
Contributor

rraustad commented Apr 15, 2025

Diffs (eplustbl.htm.absdiff.htm) in ASHRAE901_OutPatientHealthCare_STD2019_Denver are because of a change in rows in the table. This makes sense because these code changes did not change heating coil performance. Not sure why the diff dates look different compared to the actual table dates when I used the same weather file.

add_simulation_test(IDF_FILE ASHRAE901_OutPatientHealthCare_STD2019_Denver.idf EPW_FILE USA_CO_Denver-Aurora-Buckley.AFB.724695_TMY3.epw)

LOCATION,Denver-Aurora-Buckley AFB,CO,USA,TMY3,724695,39.72,-104.75,-7.0,1726.0

Diffs:

image

Develop:

image

This branch:

image

Typical diffs in many files change the TU reheat coil multiplier from -999 to 1.

image

Copy link
Contributor

@rraustad rraustad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good.

Copy link

⚠️ Regressions detected on macos-14 for commit 8e6a173

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • MDD: 2
  • MTR Small Diffs: 2
  • Table String Diffs: 1
  • ESO Small Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit 54eb86f

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • MDD: 2
  • MTR Small Diffs: 2
  • Table String Diffs: 1
  • ESO Small Diffs: 1

@Myoldmopar
Copy link
Member

OK, the code changes do look good. I'm going to jump back to tablediff and try to get the reordered/diffs stuff worked out prior to merging this though, since it's such a good example.

@Myoldmopar
Copy link
Member

@amirroth I was able to make some great changes to table diff. The full set of changes is here: NREL/EnergyPlusRegressionTool#117, but the crux of it is that table diff should now intelligently allow row reordering in most cases, and also ignore the silliest of table diffs that are not useful as regression results.

Unit tests over on the regression tool are all happy, and I am cautiously optimistic that it will come back clean here with fewer, and more meaningful regressions. Assuming it does, I'll tag a release of the regression tool, point this branch back, and then get this merged in.

Thanks for your patience, this resulted in some really nice improvements on table diff.

FYI @mjwitte

Copy link

⚠️ Regressions detected on macos-14 for commit 447bb7e

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • MDD: 2
  • MTR Small Diffs: 2
  • ESO Small Diffs: 1

@Myoldmopar
Copy link
Member

OK, so the table big diff count didn't go down, because there are still actual diffs from the multiplier. However, it is cleaner. In the previous regression run, this was in the outpatient 90.1 table diff summary:

image

And the actual diff was simply the rows reordered:

image

With the improved table diff, it's properly handling the changed row order:

image

Looks good to me. Unless there is an objection, I'll tag a new release of the regression tool, update the pip install command in this branch, and then get this merged in.

Actually..... @mjwitte, if you have a quick fix for the enum cleanup test failure, I can toss it in here.

@Myoldmopar
Copy link
Member

Alright, patched in the unit test fix suggested by @mjwitte (thanks!) and got the new regression script installing from PyPi. This should come back fully happy and this will merge in.

Copy link

⚠️ Regressions detected on macos-14 for commit 2d9f6e1

Regression Summary
  • BND: 230
  • MTD: 13
  • RDD: 48
  • Table Big Diffs: 105
  • MDD: 2
  • MTR Small Diffs: 2
  • ESO Small Diffs: 1

@Myoldmopar
Copy link
Member

Same as before, good to go. Thanks @amirroth

@Myoldmopar Myoldmopar merged commit 2baa135 into develop May 16, 2025
6 checks passed
@Myoldmopar Myoldmopar deleted the ReheatCoilMult branch May 16, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uninitialized Reheat Coil Multiplier

5 participants