Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HotFix #8581: make AirLoopHVAC:DedicatedOutdoorAirSystem's airloophvac_name extension case-insentive #8582

Merged
merged 2 commits into from
Mar 5, 2021

Conversation

jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Mar 3, 2021

Pull request overview

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@jmarrec jmarrec added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels Mar 3, 2021
@jmarrec jmarrec added this to the EnergyPlus 9.5.0 milestone Mar 3, 2021
@jmarrec jmarrec self-assigned this Mar 3, 2021
@jmarrec jmarrec changed the title Fix #8581: make AIrLoopHVAC;DedicatedOutdoorAirSystem's airloophvac_ame extension case-insentive Fix #8581: make AIrLoopHVAC:DedicatedOutdoorAirSystem's airloophvac_name extension case-insentive Mar 3, 2021
@@ -3815,7 +3815,7 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOASTest)
" 11.5, !- Precool Design Temperature {C}",
" 0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir}",
" 5, !- Number of AirLoopHVAC",
" PSZ-AC:1, !- AirLoopHVAC 1 Name",
" PSZ-ac:1, !- AirLoopHVAC 1 Name",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unit test throws without fix

Copy link
Member

Choose a reason for hiding this comment

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

Excellent reuse of an existing test!

@@ -4640,7 +4640,7 @@
17.5, !- Precool Design Temperature {C}
0.012, !- Precool Design Humidity Ratio {kgWater/kgDryAir}
5, !- Number of AirLoopHVAC
PSZ-AC:1, !- AirLoopHVAC 1 Name
PSZ-Ac:1, !- AirLoopHVAC 1 Name
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doing same in IDF file...

Comment on lines +756 to +757
for (auto AirLoopHVACName : AirLoopArray) {
std::string name = UtilityRoutines::MakeUPPERCase(AirLoopHVACName.at("airloophvac_name"));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix is here. (I also fixed an unrelated typo in variable name)

Copy link
Member

Choose a reason for hiding this comment

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

Makes perfect sense. And thanks for the typo fix.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Myoldmopar This doesn't make perfect sense. It shouldn't be necessary to MakeUPPERCase object names during input processing. We don't do that everywhere. Shouldn't FindItemInList be case-insensitive as a general solution to idfs that may have varied case for the same name? In the olden days, the input processor pushed all strings to UPPERcase so it didn't matter, but that's not been happening since the new IP with epJSON. Have we just been lucky that most files use the same case for all references to a name? My question here is prompted by a new helpdesk ticket with a similar issue for ZoneHVAC:HybridUnitaryHVAC, see #8614.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is extensive examples of getinput routines that do makeuppercase already, and it seems it really is needed. I agree that this logic should probably be baked in to avoid having to worry about it (we support case insensitiveness, then act like it). If a modification is done at a higher level (inputprocessor or the finditeminlist) then existing calls to makeupercase prior to calling routines need to be eliminated to avoid the overhead of doing it twice though

@jmarrec jmarrec changed the title Fix #8581: make AIrLoopHVAC:DedicatedOutdoorAirSystem's airloophvac_name extension case-insentive Fix #8581: make AirLoopHVAC:DedicatedOutdoorAirSystem's airloophvac_name extension case-insentive Mar 3, 2021
@jmarrec jmarrec changed the title Fix #8581: make AirLoopHVAC:DedicatedOutdoorAirSystem's airloophvac_name extension case-insentive HotFix #8581: make AirLoopHVAC:DedicatedOutdoorAirSystem's airloophvac_name extension case-insentive Mar 3, 2021
Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

This looks great. And I'm pretty sure this is completely separate from other changes but I'm going to build and run it anyway. Thanks for the quick fix @jmarrec

@@ -3815,7 +3815,7 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOASTest)
" 11.5, !- Precool Design Temperature {C}",
" 0.008, !- Precool Design Humidity Ratio {kgWater/kgDryAir}",
" 5, !- Number of AirLoopHVAC",
" PSZ-AC:1, !- AirLoopHVAC 1 Name",
" PSZ-ac:1, !- AirLoopHVAC 1 Name",
Copy link
Member

Choose a reason for hiding this comment

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

Excellent reuse of an existing test!

Comment on lines +756 to +757
for (auto AirLoopHVACName : AirLoopArray) {
std::string name = UtilityRoutines::MakeUPPERCase(AirLoopHVACName.at("airloophvac_name"));
Copy link
Member

Choose a reason for hiding this comment

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

Makes perfect sense. And thanks for the typo fix.

@Myoldmopar
Copy link
Member

Yep, builds and runs great. Merging. Thanks @jmarrec !

@Myoldmopar Myoldmopar merged commit 964ef1d into develop Mar 5, 2021
@Myoldmopar Myoldmopar deleted the 8581_AirLoopDOAS_Casing branch March 5, 2021 19:15
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 NotIDDChange Code does not impact IDD (can be merged after IO freeze)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AirLoopHVAC:DedicatedOutoorAirSystem breaks unless AirLoopHVACs are all upper case.
6 participants