-
Notifications
You must be signed in to change notification settings - Fork 195
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
ControllerOutdoorAir: new Economizer Operation Staging field #4948
Conversation
resources/model/OpenStudio.idd
Outdated
A21; \field Economizer Operation Staging | ||
\type choice | ||
\key EconomizerFirst | ||
\key InterlockedWithMechanicalCooling | ||
\default InterlockedWithMechanicalCooling |
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.
As usual, torn on whether we should make this required-field or not... The field above isn't.
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.
I think because it is a new field we don't risk breaking an API so required field is better. That is, fewer options is better and I don't see much downside except perhaps being a little inconsistent with similar cases.
src/model/ControllerOutdoorAir.hpp
Outdated
boost::optional<std::string> getEconomizerOperationStaging() const; | ||
bool setEconomizerOperationStaging(const std::string& v); |
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.
Pffff. Another one where the existing API doesn't follow the convention.
This should be std::string economizerOperationStaging() const
. Not getXXXX. And it has a default (at least currently), so no need to return an optional.
And there should be a isEconomizerOperationStagingDefaulted
and a resetEconomizerOperationStaging
if we do intend to have a default instead of making it required-field.
@kbenne thoughts please.
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.
It seems like we can keep (and depricate) the existing "get" method and add the new (correct) std::string economizerOperationStaging() const
. Is that right?
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.
No deprecation necessary - this is a new field. I'll follow the convention for required-field (which is "correct" but inconsistent with other fields on this object).
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 specific comment was more about fixing the existing API, not the new field.
You don't have to do it here, we have lots to do at the moment. But we should file an issue to fix it later if it's not done here.
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.
} else if (iddname == "OS:Controller:OutdoorAir") { | ||
|
||
// 1 Field has been added from 3.6.1 to 3.7.0: | ||
// ------------------------------------------- | ||
// * Economizer Operation Staging * 27 | ||
auto iddObject = idd_3_7_0.getObject(iddname); | ||
IdfObject newObject(iddObject.get()); | ||
|
||
for (size_t i = 0; i < object.numFields(); ++i) { | ||
if ((value = object.getString(i))) { | ||
newObject.setString(i, value.get()); | ||
} | ||
} | ||
|
||
newObject.setString(27, "InterlockedWithMechanicalCooling"); |
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.
"Economizer Operation Staging" is required, so we need VT...
CI Results for 0a5e651:
|
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.
LGTM
A21; \field Economizer Operation Staging | ||
\type choice | ||
\key EconomizerFirst | ||
\key InterlockedWithMechanicalCooling | ||
\required-field |
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.
Required field, all good
std::string economizerOperationStaging() const; | ||
bool setEconomizerOperationStaging(const std::string& v); |
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.
👍
EXPECT_TRUE(coa.isEmpty(24)); // High Humidity Outdoor Air Flow Ratio | ||
EXPECT_TRUE(coa.isEmpty(25)); // Control High Indoor Humidity Based on Outdoor Humidity Ratio | ||
EXPECT_EQ("BypassWhenWithinEconomizerLimits", coa.getString(26).get()); // Heat Recovery Bypass Control Type | ||
EXPECT_EQ("InterlockedWithMechanicalCooling", coa.getString(27).get()); // Economizer Operation Staging |
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
@@ -597,6 +604,7 @@ namespace model { | |||
setString(OS_Controller_OutdoorAirFields::HighHumidityOutdoorAirFlowRatio, ""); | |||
setString(OS_Controller_OutdoorAirFields::ControlHighIndoorHumidityBasedonOutdoorHumidityRatio, ""); | |||
setHeatRecoveryBypassControlType("BypassWhenWithinEconomizerLimits"); | |||
setEconomizerOperationStaging("InterlockedWithMechanicalCooling"); |
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
@@ -173,6 +173,9 @@ namespace energyplus { | |||
idfObject.setString(openstudio::Controller_OutdoorAirFields::HeatRecoveryBypassControlType, *s); | |||
} | |||
|
|||
// EconomizerOperationStaging | |||
idfObject.setString(openstudio::Controller_OutdoorAirFields::EconomizerOperationStaging, modelObject.economizerOperationStaging()); |
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.
great
s = workspaceObject.getString(Controller_OutdoorAirFields::EconomizerOperationStaging); | ||
if (s) { | ||
mo.setEconomizerOperationStaging(s.get()); | ||
} |
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.
If not present, uses the Ctor default, no problem here
Pull request overview
Controller:OutdoorAir
.Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.