-
Notifications
You must be signed in to change notification settings - Fork 193
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
Systematic warnings with setShadingControlType + setSetpoint(s) #4911
Comments
You're right about the bug part. As far as the warnings being annoying... Not sure I'm totally with you on this.
[1] model(main)> OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Other", "Warn")
[openstudio.model.Other] <0> Warn
=> nil
[2] model(main)> OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.ShadingControl", "Warn")
[openstudio.model.ShadingControl] <0> Warn
=> nil
[3] model(main)> OpenStudio::Logger.instance.standardOutLogger.setChannelRegex('.*(?<!ShadingControl)$')
=> nil
[4] model(main)> OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Other", "Warn")
[openstudio.model.Other] <0> Warn
=> nil
[5] model(main)> OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.ShadingControl", "Warn")
=> nil
|
@jmarrec : thanks for the logger tips! |
Fix #4911 - Avoid extra warning message in ShadingControl
Enhancement Request (low priority)
User changes to ShadingControl control type (e.g. from the default "OnIfHighSolarOnWindow") and/or to required setpoint(s) trigger one or more warnings to STDOUT (for instance a systematic resetSetpoint, triggering this warning:
OpenStudio/src/model/ShadingControl.cpp
Line 334 in 872300d
IMO, these warnings are atypical for the SDK, unnecessary, and a source of confusion.
IRB steps to trigger STDOUT warnings:
or
Possible Implementation
The simplest would be to cease generating such warnings altogether. There are numerous OpenStudio objects that are generated without a complete set of attributes (or maybe conflicting ones), only to be discovered when attempting to run an E+ simulation. Users aren't warned in advance; more of a consumer beware approach. It's great to rely on returned booleans to signal successful/failed attempts to re/set attributes, but I would prefer less verbose assistance such as the warnings discussed here.
A more nuanced solution would be to provide method overrides with additional parameters as needed (without triggering warnings), e.g.:
ctl.setShadingControlType("OnIfHighOutdoorAirTempAndHighSolarOnWindow", 18, 100)
... possibly even with default parameter values if missing.
Possible BUG
Not 100% certain, but I think this is a bug:
OpenStudio/src/model/ShadingControl.cpp
Line 409 in 872300d
... should it not be:
if (ShadingControl_Impl::isControlTypeValueNeedingSetpoint2(shadingControlType))
The text was updated successfully, but these errors were encountered: