-
Notifications
You must be signed in to change notification settings - Fork 208
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
Handle incomplete EPW design conditions header #5134
base: develop
Are you sure you want to change the base?
Conversation
be61615
to
82ac99f
Compare
Rebased onto develop and resolved conflicts. |
… optional into optional for getters
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 couple of minor changes
resources/utilities/Filetypes/USA_CO_Golden-NREL.724666_TMY3_IncompleteDesign.epw
Outdated
Show resolved
Hide resolved
I didn't find occurrences of this being used anywhere in the common openstudio-gems I have on my machine right now. The only one I can find is ResStock's weather.rb, but I'm sure @joseph-robertson is well aware he'll need to change that so I'm fine with the API Break. @kbenne, grand protector of the API, could you chime in for confirmation? |
@jmarrec I think OS-HPXML's weather.rb was originally what motivated this PR; there's no way to know if it's actually zero vs. missing. However, did you see my "-9999" question here? #5318 (comment) |
It's debatable whether -9999 or boost::optional is better than the other, and I'd be fine with both probably. As long as we convey that it's missing, that's probably fine. The -9999 option does allow not breaking API, which is a plus. And even for dry bulb temperature, you could always check if < -100C and you'd be guaranted to know it's missing. |
@jmarrec Hm. Well what's your vote here? Should we at least be consistent with the new EPW ground temperatures implementation? I.e., change all ground temps getters to boost::optionals if we decide to go with this PR as-is? |
CI Results for 7e68d39:
|
Pull request overview
EpwDesignCondition
has many API-breaking changes related to its getters. The previous behavior was to misleadingly return a value of 0 for any empty design condition header field. The types for the getters are now eitherboost::optional<double>
orboost::optional<int>
.Notes:
stringToDouble
return 0.0 if an empty string is passed in? Yes.heatingDryBulb99
is empty string insetHeatingDryBulb99
? Yes.boost::optional<double>
; e..g,double EpwDesignCondition::heatingDryBulb99() const {
toboost::optional<double> EpwDesignCondition::heatingDryBulb99() const {
? Yes.double m_heatingDryBulb99
toboost::optional<double> m_heatingDryBulb99
in EpwDesignCondition class? Yes.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.