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.

sara S2 avatar image sara S2 commented ·

In fact I am trying to do the following:

The ASRSvehicle is acquired only for one token, the other tokens are returned to the list and pulled when ASRSvehicle is released. I am trying to test this in the attached model, this is why I used the activities "push to list" and "wait for event".

Could you please tell how to do this?

0 Likes 0 ·
tannerp avatar image tannerp sara S2 commented ·

You've described what is happening in the model that I attached. If you watch the gif below, you'll see that the ASRS Vehicle is acquired by one token at a time and the extra tokens are added as back orders. They cannot acquire the ASRS Vehicle until it is released. You don't need to push any tokens to a list to wait. They already wait.

I'm afraid I don't understand what changes you'd like to make.

1 Like 1 ·
sara S2 avatar image sara S2 tannerp commented ·

@tanner.p , thank you for your help.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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