Closed joseph-robertson closed 3 months ago
Although this PR contains an API breaking change, I believe the negative impacts should be fairly minimal. The primary API changes are:
ScheduleDay::getValue
returns when ScheduleDay::setInterpolateToTimestep
is true
(which acted the same as 'Linear' in EnergyPlus, although FT would set the option to 'Average')ScheduleDay::setInterpolateToTimestep
to take the appropriate options to instead of a booleanIn openstudio-standards, ComStock and a few measure repos I've looked at, there are many uses of ScheduleDay::getValue
, but the only uses of ScheduleDay::setInterpolateToTimestep
are to set as false (with one exception, which is the use in openstudio-standards from which I identified this issue, but which I removed because it was not needed). Since the default ScheduleDay interpolation method is 'none', all the existing uses of getValue
would be unaffected by these changes.
Adding the appropriate options to setInterpolateToTimestep
and the Average interpolation calculation is an improvement in that it aligns the OpenStudio user experience with how EnergyPlus interprets that input, and the addition of the ScheduleDay::timeSeries
method adds further utility to users in processing of schedules, such as in equivalent full-load hour calculations and parametric schedule modifications.
In short, these are good and necessary changes. Thanks @joseph-robertson!
@joseph-robertson Thanks for addressing some of the review comments.
I'm still not happy about getValue, and maybe we should open a ticket to revisit the getValue and avoid recomputing the entire day, but maybe not.
Anyways, if CI is happy with this, we can merge.
/srv/jenkins/openstudio/docker-volumes/ubuntu-2004/Openstudio/src/utilities/data/Vector.cpp:103:7: error: ‘OS_ASSERT’ was not declared in this scope; did you mean ‘BOOST_ASSERT’?
fixed in 012f076b8476fb752e849672bc1b2f1bb08f6843
CI Results for 7493115cf7e447813cf444592b7a284837bb1a0a:
Ubuntu 20.04:
Ubuntu 22.04:
Darwin:
Windows:
Code Coverage:
Pull request overview
A new
timeSeries()
method for returning vectors of times and values given the number of timesteps per hour integer from theTimestep
object.Align the OS and E+ IDDs. The "Interpolate to Timestep" field is now "No", "Average", or "Linear" (i.e., a Breaking Change). The behavior of:
LinearInterp
)HoldNextInterp
, andAverageInterp
interpolation on schedule values given the simulation timestepUpdate the FT to write the correct method, not just "Average" as it was before.
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.