-
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
Add ability to create Holiday Schedules in ScheduleRuleset #3814
Conversation
…t, delete applyHoliday from Schedule:Rule
… Winter/Summer Design Day
…ntrolSpecialDays ('Special Day Type" field)
… you use ft.setKeepRunControlSpecialDays(true)
src/energyplus/ForwardTranslator/ForwardTranslateScheduleRuleset.cpp
Outdated
Show resolved
Hide resolved
In general I think this looks good. I need to wait on receiving some example idf file(s) to see if this implementation will accommodate the needs. |
\type choice | ||
\default No | ||
\key Yes | ||
\key No |
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.
Remove this (currently unused) field from Schedule:Rule
. Handled in Version Translation.
A6, \field Winter Design Day Schedule Name | ||
\type object-list | ||
\object-list DayScheduleNames | ||
A7; \field Holiday Schedule Name |
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.
New field on Schedule:Ruleset
@@ -499,6 +499,7 @@ Workspace ForwardTranslator::translateModelPrivate( model::Model & model, bool f | |||
} | |||
|
|||
|
|||
// TODO: is it time to uncomment that? | |||
// temp code | |||
if (!m_keepRunControlSpecialDays){ | |||
// DLM: we will not translate these objects until we support holidays in the GUI |
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 it's time to uncomment that.
@@ -148,6 +148,8 @@ boost::optional<IdfObject> ForwardTranslator::translateScheduleRuleset( Schedule | |||
ScheduleDay defaultDaySchedule = modelObject.defaultDaySchedule(); | |||
ScheduleDay summerDesignDaySchedule = modelObject.summerDesignDaySchedule(); | |||
ScheduleDay winterDesignDaySchedule = modelObject.winterDesignDaySchedule(); | |||
// ScheduleRuleset is the one carrying the Holiday Schedule | |||
ScheduleDay holidayDaySchedule = modelObject.holidaySchedule(); |
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.
Would return the scheduleRuleset.defaultDaySchedule()
if not explicitly set (=same behavior as before). The translation of this ScheduleDay is called later
|
||
translateAndMapModelObject(defaultDaySchedule); | ||
translateAndMapModelObject(summerDesignDaySchedule); | ||
translateAndMapModelObject(winterDesignDaySchedule); | ||
translateAndMapModelObject(holidayDaySchedule); |
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.
Translation of this potentially new ScheduleDay to handle
OS_ASSERT(value); | ||
return openstudio::istringEqual(value.get(), "Yes"); | ||
} | ||
*/ |
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.
Deleting all already-commented-out regarding Apply Holiday in Schedule:Rule now that the IDD doesn't bear the field => No API change
test = newScheduleRuleset.setPointer(OS_Schedule_RulesetFields::HolidayScheduleName,newHolidaySchedule.handle()); | ||
OS_ASSERT(test); | ||
} | ||
|
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 additions to this file are basically copied over from Winter/Summer Design Day, since the Holiday Schedule will behave exactly like them: they all are "Special Day Profiles"
|
||
// Note: OS:ScheduleRuleset got a new optional field at the end, so no-op | ||
// } else if (iddname == "OS:Schedule:Ruleset") { | ||
|
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.
Version Translation for IDD Changes
src/energyplus/ForwardTranslator/ForwardTranslateScheduleRuleset.cpp
Outdated
Show resolved
Hide resolved
src/energyplus/ForwardTranslator/ForwardTranslateScheduleRuleset.cpp
Outdated
Show resolved
Hide resolved
I need to move the VT into the right block. Seems like in merging latest develop it went wrong (originally it was in update_2_9_0_to_3_0_0) |
Pull request overview
See #3783 for the rationale used, explaining why I chose to add the Holiday schedule to
ScheduleRuleset
instead ofScheduleRule::applyToHoliday
(TL;DR: if in ScheduleRule, potentially multiple ScheduleRules with applyToHoliday=true could be applied during the same week (this translate to a Schedule:Week:Daily...))Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)src/openstudio_lib/library/OpenStudioPolicy.xml
)Labels:
IDDChange
APIChange
: N/APull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.