Problem with Save Context in Preemption

Problem with Save Context in Preemption

agustin_p3
Not applicable
62 Views
2 Replies
Message 1 of 3

Problem with Save Context in Preemption

agustin_p3
Not applicable

[ FlexSim 21.2.4 ]

I have encountered a quite strange issue around the Save Context activity when preempting tokens. I cannot share the model due to confidentiality reasons but basically the problem is that it looks like the Save Context activity is not saving the token's context at the time it is triggered but the context corresponding to the next activity the preempted token would enter instead. (I can tell by the changes in the labels when the token is stored).

At the moment of releasing the token, it is sitting in a Wait for Event activity actually far from progressing down its path so it is not due to it leaving Wait for Event right before it is released.

I figured out a temporary fix by adding a breath (Delay activity with a minimal time) so the Save Context would save the token's unaltered information in that Delay activity, but I'd like to know what is the real issue there.

Has anybody come across anything like this?

Thank you.

0 Likes
Accepted solutions (1)
63 Views
2 Replies
Replies (2)
Message 2 of 3

JordanLJohnson
Autodesk
Autodesk
Accepted solution

Saving token contexts is a tricky business. You may have discovered a bug, but it's difficult to tell without a model. If you could make a simple model that has the behavior you've described, we may be able to tell if it's a bug, or if it's not a bug, explain how Save Context works in that particular situation.

.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 3

connor_a
Not applicable

Hi @Agustin P3, was Jordan Johnson's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes