I am using the Shiftcalendar. When scheduling a certain timepoint, the second parameter (Duration) is mandatorily requested to be positive. Why is it unthinkable to set it to 0 for finding out when a shift starts at it's earliest timepoint?
Is it such a big change????
I would like to add a wish for a second boolean flag concerning the schedule command:
If it is set, then the remaining time from a certain break shall be added to the next starting point,
If it is not set, the next scheduled Timepoint shall be the beginning of the next shift.
For detecting a shift change, see this post: https://community.plm.automation.siemens.com/t5/Plant-Simulation-Forum/Detecting-shift-change/m-p/31...
It's possible to watch the attribute 'Unplanned'. Whenever a shift changes the value of this attribute changes as well. The you can use the method 'getCurrShift' to get the name of the current shift.
we will add an observable attribute 'CurrentShift' to the next release of Plant Simulation.
Then you can add an observer to detect shift changes.
The "next release" of plant simulation is V13 I guess since I'm running 12.2 and can't find it in the list of attributes for the shift calendar.