question

sara S2 avatar image
0 Likes"
sara S2 asked sara S2 commented

The simulation time stops before all tokens are executed!

Hello,

In the attached model, the simulation time stops before all tokens are executed, they are stuck in "wait for event" activity.

Would anyone tell me the reason of this trouble, please?

Regards.

test1.fsm

Other (please specify)
Other
processflowruntime
test1.fsm (36.1 KiB)
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

tannerp avatar image
0 Likes"
tannerp answered sara S2 commented

@sara S2,

You've created a deadlock in your model by using the same tokens to push and pull the items from a list. The tokens stay at the Push to List activity until they are pulled by something else. This means that unless new tokens are created, nothing will be pulled.

It seems to me like you're creating a token that's connected to an item to pull that item from a list (which is redundant). Then you're deciding whether or not to send a token to acquire a resource based on that resource being free. This logic is already built in to the Acquire activity, so this is also redundant.

I eliminated all of the pushing/pulling/waiting events and now the model runs just fine. I think it was a little over-complicated before.

test1_1.fsm


old-pf.png (19.1 KiB)
new-pf.png (11.4 KiB)
test1-1.fsm (31.6 KiB)
· 3
5 |100000

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