-
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
ZoneHVAC:HybridUnitaryHVAC ERR object type output #8326
Conversation
…ridunitary-erroutput
…ridunitary-erroutput
@Myoldmopar You disabled some HybridUnitary unit tests in 799b650. They run fine locally. Any reason to keep them disabled? |
If they are running fine go ahead and re-enable them. |
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.
@matthew-larson Please merge in develop and resolve conflicts and address these other comments.
ShowSevereError(RoutineName + cCurrentModuleObject + "=\"" + Alphas(1) + " invalid data"); | ||
ShowSevereError(RoutineName + cCurrentModuleObject + " = " + Alphas(1) + " invalid data"); | ||
ShowContinueError("Invalid-not found" + cAlphaFieldNames(19) + "=\"" + Alphas(19) + "\"."); |
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.
The object type for the error message is fixed now, but the error message is still basically empty:
** Severe ** GetInputZoneHybridUnitaryAirConditioners: ZoneHVAC:HybridUnitaryHVAC = MUNTERSEPX5000 invalid data
** ~~~ ** Invalid-not found="".
In the call to getObjectItem
, the field names are returned in cAlphaFields
. Some error messages use this variable, but a few (like the error shown here) are using cAlphaFieldNames
which is blank. Replace all of these with cAlphaFields
and the error message should show the field name that's in error.
@@ -1265,4 +1265,124 @@ TEST_F(EnergyPlusFixture, DISABLED_Test_UnitaryHybridAirConditioner_ModelOperati | |||
} | |||
} | |||
|
|||
TEST_F(EnergyPlusFixture, DISABLED_Test_UnitaryHybridAirConditioner_ValidateError) |
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.
Please enable this unit test and all of the other hybrid unitary tests. They run fine locally here.
@mjwitte It may be fine to enable the hybrid unitary tests, but I remember seeing this from @Myoldmopar:
@matthew-larson looked into this a bit and couldn't reproduce the issue. Do we still want to move forward with enabling them? |
@nealkruis I ran all of the hybrid unit tests serially and it was fine here (Windows 10). I'm running everything now. Moving that to the namespace likely corrected the problem. Either way, these need to be enabled. If there's still a problem, then it can be fixed. |
@mjwitte I updated the code based on your comments and also re-enabled the unit tests. Tests all run successfully for me locally. |
@matthew-larson That's better.
But why is this an error? The IDD implies that this field is optional. @Myoldmopar Any idea what happened with the windows CI failure? |
@mjwitte that's a great point about that particular field being optional. Digging into it a little, the
|
@matthew-larson This still needs to trap an invalid non-blank OA specification object name. For optional fields without a default, the input processing should check if the field is blank (using the logical array that's returned from |
@mjwitte that makes sense. I modified the code as shown below, which I believe now acts as intended to check if the field is blank, otherwise grab the pointer and throw an error if 0.
|
@matthew-larson Yes, like that. While you're in there, it would be good to review all of the other optional fields in the (massive) object to see if they are all being processed correctly. I suppose a test file with all optional fields left blank should expose any problems. |
…ode is required, and update unit test to test optional fields.
…ridunitary-erroutput
@@ -4241,7 +4241,7 @@ \subsubsection{Inputs} | |||
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws return air. This node name must also be specified as a zone return air node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. It may also be included in \hyperref[nodelist]{NodeList} object that is specified as a zone return air node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. (Ref. Group - Zone Equipment \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} and Group - Node-Branch Management \hyperref[nodelist]{NodeList}). | |||
|
|||
\paragraph{Field: Outdoor Air Node Name} | |||
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws outdoor air. This node name must also be specified in an \hyperref[outdoorairnode]{OutdoorAir:Node} or \hyperref[outdoorairnodelist]{OutdoorAir:NodeList} object. If this field is blank, a node name will be created internally. (Ref. Group - Node-Branch Management \hyperref[outdoorairnode]{OutdoorAir:Node} and \hyperref[outdoorairnodelist]{OutdoorAir:NodeList}). | |||
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws outdoor air. This node name must also be specified in an \hyperref[outdoorairnode]{OutdoorAir:Node} or \hyperref[outdoorairnodelist]{OutdoorAir:NodeList} object. (Ref. Group - Node-Branch Management \hyperref[outdoorairnode]{OutdoorAir:Node} and \hyperref[outdoorairnodelist]{OutdoorAir:NodeList}). |
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.
The IDD has this as a required field so I just removed the statement about leaving the field blank.
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.
Good catch. But the code for this input is wrong. See comment below.
@mjwitte I cleaned up a couple more optional fields to prevent incorrect errors and updated the unit test with optional fields left blank. |
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.
@matthew-larson Almost there.
@@ -4241,7 +4241,7 @@ \subsubsection{Inputs} | |||
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws return air. This node name must also be specified as a zone return air node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. It may also be included in \hyperref[nodelist]{NodeList} object that is specified as a zone return air node in a \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} object. (Ref. Group - Zone Equipment \hyperref[zonehvacequipmentconnections]{ZoneHVAC:EquipmentConnections} and Group - Node-Branch Management \hyperref[nodelist]{NodeList}). | |||
|
|||
\paragraph{Field: Outdoor Air Node Name} | |||
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws outdoor air. This node name must also be specified in an \hyperref[outdoorairnode]{OutdoorAir:Node} or \hyperref[outdoorairnodelist]{OutdoorAir:NodeList} object. If this field is blank, a node name will be created internally. (Ref. Group - Node-Branch Management \hyperref[outdoorairnode]{OutdoorAir:Node} and \hyperref[outdoorairnodelist]{OutdoorAir:NodeList}). | |||
This alpha input field specifies the name of the HVAC system node from which the hybrid unit draws outdoor air. This node name must also be specified in an \hyperref[outdoorairnode]{OutdoorAir:Node} or \hyperref[outdoorairnodelist]{OutdoorAir:NodeList} object. (Ref. Group - Node-Branch Management \hyperref[outdoorairnode]{OutdoorAir:Node} and \hyperref[outdoorairnodelist]{OutdoorAir:NodeList}). |
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.
Good catch. But the code for this input is wrong. See comment below.
ZoneHybridUnitaryAirConditioner(UnitLoop).SecondaryInletNode = GetOnlySingleNode(state, Alphas(10), | ||
ErrorsFound, | ||
CurrentModuleObject, | ||
cCurrentModuleObject, | ||
Alphas(1), | ||
NodeType_Air, | ||
NodeConnectionType_OutsideAirReference, |
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 is kind of nit-picky, but NodeConnectionType_OutsideAirReference
should be NodeConnectionType_OutsideAir
because this node is a real outdoor air node with flow, not just a sensor.
ZoneHybridUnitaryAirConditioner(UnitLoop).TsaMax_schedule_pointer = GetScheduleIndex(state, Alphas(5)); | ||
if (ZoneHybridUnitaryAirConditioner(UnitLoop).TsaMax_schedule_pointer == 0) { | ||
ShowSevereError("Invalid " + cAlphaFields(5) + '=' + Alphas(5)); | ||
ShowContinueError("Entered in " + cCurrentModuleObject + '=' + cAlphaArgs(1)); |
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.
Made a test file with bad inputs in a bunch of fields, and some of the error messages are still broken:
** Severe ** Invalid Minimum Supply Air Temperature Schedule Name=XMINSUPPLYT
** ~~~ ** Entered in ZoneHVAC:HybridUnitaryHVAC=MAIN ZONE BASEBOARD
cAlphaArgs
should be Alphas
here and elsewhere. Here's the test file:
UnitaryHybridAC_bug-ForceErrors1.idf.txt
@matthew-larson Almost there, no more |
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.
All good now. Merging.
Pull request overview
Pull 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.
If feature, test running new feature, try creative ways to break itCheck any new function arguments for performance impactsVerify IDF naming conventions and styles, memos and notes and defaultsIf new idf included, locally check the err file and other outputs