question

Stan Davis avatar image
0 Likes"
Stan Davis asked Stan Davis commented

Cancel Outstanding Cumulative Downtime

I have been studying the behaviour of operator downtime using a timetable replicating a M-F work schedule with morning, lunch and afternoon breaks. The downtime is non-preemptive but has a higher priority than the processing test task.

I've discovered the operator will take his missed downtime after being released from the processing task. If the processing task has held him over multiple downtimes (e.g. break & lunch), the downtimes accumulate and are executed consecutively once released by the processing task.

This is desirable if the missed downtimes occur and are executed in the same day. However, it is not desirable for missed downtimes to accumulate and be executed the next morning. I need a way to cancel any outstanding scheduled downtimes at the close of the workday.

To illustrate, I have attached a small test model with the processing task releasing the operator after the end of the day. Any help would be appreciated.

Thanks, Stan


FlexSim Help - Cancel Outstanding Cumulative Downtime.fsm

FlexSim 21.2.4
down behaviordowntime
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Stan Davis commented

The down behaviours dispatch task sequences of predetermined length (based on time table) to the operator. These get added to the "tasksequencequeue" node in it's variables tree. You can delete or adjust those task sequences at will using code.

I wrote some code for your sample model that gets run before the processing task finished. It checks how much time is left until the end of shift (5pm). Then is runs through all pending tasks. If there isn't enough time to finish the task, the duration of the task will get adjusted down to only last until end of shift. Any further tasks get deleted.

If the remaining time until the end of shift is negative (already ended), all tasks but the last (which should be the "home" task get deleted). The home task duration gets adjusted to end at 7am on the next day.

flexsim-help-cancel-outstanding-cumulative-downtime_fm.fsm

Note: The code assumes all pending tasks were created by the down behaviours and as such involve a travel task first and a delay task second, the duration of which is stored in "var1". If you want to manipulate the task queue in a larger model you might have to include checks to differentiate between different types of pending task sequences.


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Stan Davis avatar image Stan Davis commented ·
Exactly what I needed. I appreciate the time you took to provide the code. Thanks again - Stan
0 Likes 0 ·