Duplicated orphaned ScheduleRule when making a new profile based on existing one
I have imported a schedule from a library which has 12 different schedules within it. After getting imported each schedule creates a copy of its own schedule as shown in the image below.
OS APP 1.1.0
Windows 10
Can you attach the original OSM you imported @rwadhwa910 ? By import, do you mean you loaded the OSM as a library and dragged the schedule into your model from the library?
@rwadhwa910 ping.
@macumber I imported the osm file as a library and then drag the schedules that were there in the osm file.I am not sure whether I have that osm file with me as I was working on NREL computer at that time.
I'm not seeing this same behavior but I am seeing orphan schedule day objects created when you "Make a new profile based on" another schedule.
I can't see the duplicated stuff. I suspect user tried to load the same OSM as a library, and while editing the OSM tried to import from that "library".
As far as orphaned... There's a double clone happening between the OSApp and the SDK.
https://github.com/openstudiocoalition/OpenStudioApplication/blob/d115b0393ee44efb01f97b19639ca7ebb0a4a0c4/src/openstudio_lib/SchedulesTabController.cpp#L121-L134
It's perhaps confusing but the SDK ctor ScheduleRule::ScheduleRule(ScheduleRuleset& scheduleRuleset, const ScheduleDay& daySchedule) actually clones daySchedule already internally...
https://github.com/NREL/OpenStudio/blob/92a416c03a98b44b67668e5b3d6d3c89be729afa/src/model/ScheduleRule.cpp#L600-L617
For the record, the same applies to Summer/Winter/holiday profiles... ScheduleRuleset::setXXXDesignDaySchedule ALSO clones the schedule day it's passed (which is confusing).
https://github.com/NREL/OpenStudio/blob/92a416c03a98b44b67668e5b3d6d3c89be729afa/src/model/ScheduleRuleset.cpp#L281-L307
Is there really an action item for us here? Seems like this is the default behavior of the OS SDK (which clones the schedule days), or am I misreading the situation?