The simulation time stops before all tokens are executed!

The simulation time stops before all tokens are executed!

sara_s2
Not applicable
15 Views
4 Replies
Message 1 of 5

The simulation time stops before all tokens are executed!

sara_s2
Not applicable

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

0 Likes
Accepted solutions (1)
16 Views
4 Replies
Replies (4)
Message 2 of 5

tanner_p
Not applicable
Accepted solution

@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.

29930-old-pf.png

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.

29947-new-pf.png

test1_1.fsm

0 Likes
Message 3 of 5

sara_s2
Not applicable

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
Message 4 of 5

tanner_p
Not applicable

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.

29966-one-token-at-a-time.gif

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

Message 5 of 5

sara_s2
Not applicable

@tanner.p , thank you for your help.

0 Likes