OpenStudio Year/Week/Day Schedule trouble
I was playing with the Year/Week/Day Schedules in OpenStudio-3.7.0. The following is an example:
OS:ScheduleTypeLimits,
{abaae976-8a76-4786-a0c5-0c4754d162b2}, !- Handle
STL Fraction, !- Name
0, !- Lower Limit Value
1, !- Upper Limit Value
Continuous, !- Numeric Type
Dimensionless; !- Unit Type
OS:Schedule:Day,
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Handle
SD Solar Transmittance - All Days, !- Name
{abaae976-8a76-4786-a0c5-0c4754d162b2}, !- Schedule Type Limits Name
No, !- Interpolate to Timestep
24, !- Hour 1
0, !- Minute 1
0.15; !- Value Until Time 1
OS:Schedule:Week,
{c729a72e-c91b-43ed-9390-068a3c82c760}, !- Handle
SW Solar Transmittance - All Weeks, !- Name
, !- Schedule Rendering Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Sunday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Monday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Tuesday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Wednesday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Thursday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Friday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Saturday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- Holiday Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- SummerDesignDay Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- WinterDesignDay Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}, !- CustomDay1 Schedule:Day Name
{866e0603-816b-4d3a-8719-712f3e301e60}; !- CustomDay2 Schedule:Day Name
OS:Schedule:Year,
{2dcb64a5-6a91-458b-a136-5e581872632b}, !- Handle
SY Solar Transmittance, !- Name
{abaae976-8a76-4786-a0c5-0c4754d162b2}; !- Schedule Type Limits Name
This is embedded in a larger model with many other such schedules, and when I run that model, the following error shows up for all those schedules.
eplusout.err
** Severe ** ProcessScheduleInput: Schedule:Year="SY SOLAR TRANSMITTANCE" has missing days in its schedule pointers
From what I can tell by the above OS objects, I seem to have all days covered?
Any thoughts would be appreciated.
OOPS, I think there is a part missing from OS:Schedule:Year - I don't have access to that right now, hope I can backfill that tomorrow.
Could you try the same in 3.8.0 please? I don't feel like investigating something that might have already been fixed (could be https://github.com/NREL/OpenStudio/pu... for eg). Also, code to repro the schedule creation is a major plus!
Thank you Julien. The last bit of OS:Schedule:Year where OS:Schedule:Week would be inserted with dates was not generated by my scripts after all. Interestingly, when I create these schedules BEFORE selecting a weather file, it works OK, but not if I do that AFTER selecting such. My OS:Schedule:Year uses OS:Date(MonthOfYear,DayOfMonth), where the year seems to default to 2009. Without weather file, OpenStudio seems to not care about this. With a TMY weather file, that file seems to assume 2006, which seems to collide with 2009 from OS:Date and then prevents insertion of OS:Schedule:Week.
I have fixed this by using year_description = model.getYearDescription() and year_description.setCalendarYear(year), such that year = EpwFile().startDateActualYear() when the weather file is an AMY, and year = 2009 when it is a TMY. And then later on use year = model.getYearDescription().calendarYear() for use in OS:Date(MonthOfYear,DayOfMonth,year). This may not be 100% correct or efficient, but it seems to so the trick. I do not think it has anything to do with 3.7.0 vs. 3.8.0, unless 3.8.0 manages weather files and OS:Date differently.