question

Patrick Zweekhorst avatar image
1 Like"
Patrick Zweekhorst asked Jordan Johnson answered

Token not pulled from list

Hi,

We have a model where we think something goes wrong with pulling a token from a list.
Attached is an example model. There are two pull activities (top and bottom). A token only enters the top pull activity when something is pushed on the list (using a wait for event). There is a token in the bottom pull activity directly from the start. At time 1 there are two sources that push tokens to the list.
Using the backorder sort query, the top pull activity should pull first, the bottom second. The top pull activity has a max wait timer of 0, and the list has the check box allow multiple pushes before back order fulfillment switched on.

At time 1 we would expect that both token can pull something from the list. This is however not the case. The top pull token does not pull, and goes to exit 2. Why is this?

The top token does pull something when there is no token in the other pull activity (why does it work in this case?). It also pulls something when you change the max wait time to 0.01 instead of 0.

Can someone explain why we see this behaviour or check if this is a bug?

Thanks,

Patrick

tokennotpulled.fsm

FlexSim 19.1.1
wait for eventpull from listbackordermax wait timer
tokennotpulled.fsm (31.2 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.

Jordan Johnson avatar image
1 Like"
Jordan Johnson answered

This issue is caused by the Max Wait Timer being set to zero. Here is what happens:

Time 0.0: the first backorder is created.

Time 1.0: the first push happens. The list schedules an event in just slightly more than zero time to evaluated any backorders.

Time 1.0: the second push happens. The list has already scheduled the future event to check backorders, so nothing happens.

Time 1.0: the second token attempts to pull from the list. Since the list is waiting for more pushes before evaluating any backorders, it creates a backorder for the new token.

Time 1.0: the max wait timer elapses. The token did not succesfully pull, so it exits out the "failed" connector.

Time 1.0 + the tiniest amount possible: the list evaluates its backorders. The first token is the only backorder, so it pulls.

If the max wait timer didn't elapse, the token would have a valid backorder when the list checks its backorders. I recommend a small time, like 0.1 or 1e-4. As long as the max wait timer will elapse after the list checks its backorders, you will get the behavior you want.

5 |100000

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

PETITJEAN CM avatar image
0 Likes"
PETITJEAN CM answered Patrick Zweekhorst commented

Hi,

I don't know if I make the good analysis but I think we can explain it like this :

1° first your list is empty and you have the bottom pull requirement (red arrow number 1)

2° the first push command bring one element in your list

3° the second push command bring an other one element in your list

4° You have the top pull requirement at this moment (red arrow number two). But as you see with the red token in your list, the first requirement block the process. You can't pull because you didn't pull the first requirement (red arrox number 1)

5° The problem at this moment is, as you define your max wait timer on 0, your top pull requirement won't be examinated a second time, and your top process will continue to the next step

6° only now the first bottom pull request is realized (because it's the principle of a discret simulation software, even if things happened in the same time, there is an order to execute them)

7° so the bottom pull request works

That's why a solution is to put your Maximum wait time on 0,01 because it will add an other step after the 7° because the process will try again to see if he can pull the token :

but notice I'm just a FlexSim user as you, wait for an expert confirmation !

Have a nice day !


image1.png (75.2 KiB)
image2.png (93.8 KiB)
· 1
5 |100000

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

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Hi @PETITJEAN CM,

Thanks for your answer, with the nice pictures.

I however don't think you are correct in step 4. I sort the back orders and allow multiple pushes before reevaluating the backorders. This would mean that the second token should just try and pull something from the list first. Followed by the first token.

I think there is a timing issue or a bug.
Maybe @jordan.johnson knows what is going on here?

0 Likes 0 ·