question

Cetim C avatar image
0 Likes"
Cetim C asked Jason Lightfoot commented

Problems with preemption

Hello,
I want that the operator travel to queue2 and have 40 second delay, but he will be interrupted every 10 seconds so he has to go to queue1 and come back. On return, I want the delay to be at the same point, and that is the proble, that every time he returns, the counter is reset. It is as if the save context is not running.
Attach the model.
Thanks in advance
InterruptionV2.fsm

FlexSim 22.1.2
preemption
interruptionv2.fsm (51.0 KiB)
· 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.

1 Answer

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

You should not preempt tokens that are waiting for a task to complete - instead you should preempt the task executer by using a higher priority task sequence with prempt set to PREEMPT_ONLY. When that sequence is complete the task executer will resume the preempted task and fire the callback at the correct time. If you need to, insert milestone tasks in order that you repeat things like travel if needed.


· 6
5 |100000

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