-
Notifications
You must be signed in to change notification settings - Fork 393
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
Conversation
…me extension case-insentive
@@ -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", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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...
for (auto AirLoopHVACName : AirLoopArray) { | ||
std::string name = UtilityRoutines::MakeUPPERCase(AirLoopHVACName.at("airloophvac_name")); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this 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", |
There was a problem hiding this comment.
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!
for (auto AirLoopHVACName : AirLoopArray) { | ||
std::string name = UtilityRoutines::MakeUPPERCase(AirLoopHVACName.at("airloophvac_name")); |
There was a problem hiding this comment.
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.
Yep, builds and runs great. Merging. Thanks @jmarrec ! |
Pull request overview
AirLoopHVAC:DedicatedOutdoorAirSystem
'sairloophvac_name
extension case-insentivePull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.