question

David Besson avatar image
3 Likes"
David Besson asked Jacob Gillespie commented

Restoring token context with a different resource

(This refers to an answer here about using Process Flow preemption to assign shift schedules)

The "Save Token Context" activity stores also the resource (for example, an operator) acquired by the token.

How could we restore the token context, but with a different resource (other operator)?

For example, if a token had been in a Delay activity for x seconds when its context was saved, it will resume the Delay at x seconds when it is restored BUT NOT the first resource acquired (a new one is then acquired).

FlexSim 16.1.0
process flowresourcepreemptionschedule
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

Adrian Haws avatar image
4 Likes"
Adrian Haws answered Jacob Gillespie commented

The “Save Context” activity only saves data specific to the activity the token is in. For a Delay, that means it saves the delay time and the time the token has already been in the Delay activity. Save Context will not save information on the resource. Something you can do is release the operator and acquire a new one within the preemption flow. I’ve included an example of one way to set this up.

pf-preemption-2.fsm


preemption.png (13.6 KiB)
pf-preemption-2.fsm (27.0 KiB)
· 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.