question

Beatriz Aof avatar image
0 Likes"
Beatriz Aof asked Kavika F commented

Fulfill List Backorder

Hi, I have a list of tasks executers that are assign to locations but they stay all the time at the list, when there are no tasks executers available I want that they stay at activity pull ambulance as back orders and then when one them is available that be assign to the first back order. When there are 2 backorders on the list and one task executer be available this one is assign to both back orders but I only want that the task executer be assign to the first backorder and that the second backorder wait for another task executer, how can I do this?


The model: https://we.tl/t-8rfFkhtsv1

FlexSim 22.2.0
listpull from listlistbackorders
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

Kavika F avatar image
0 Likes"
Kavika F answered Kavika F commented

Hey @Beatriz Aof, your problem comes from the Process Flow spawning and pulling from the list immediately. Here's a step-by-step view of what your process flow is doing in an instant at the 60 second mark.

tokens-one-at-a-time.gif

The only reason your process flow works in the first place is because these tokens all spawn at the beginning and run down to Pull an Ambulance off the list one at a time. Because of this, the token is able to assign the "Going Emergency" label and update the list by the time the next token comes. However, it's a different story for the two tokens spawned later at 180 seconds.

tokens-at-the-same-time.gif

This is around 2738 seconds. I added a breath to stop the tokens there before the proceeded further so I could analyze their stats. Both tokens spawn at the source and then move down one at a time to be stopped at the Pull Ambulance activity. When the first ambulance becomes available, it triggers both of the tokens to pull from the list. Because of that, they both pull that one ambulance.

If you try putting a breath right after the Pull Ambulance activity, then all of the tokens from the first wave are taken by 1 ambulance and the two tokens in the second wave get taken by another, leaving the other 16 ambulances inactive.

I know you want to keep ambulances on the list, but I'm not sure why. One solution would be to take ambulances off the list when they're in use and then push them back onto the list once they're back at the hospital.

1661197942097.png

I tested it and it works fine that way.


· 6
5 |100000

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

Beatriz Aof avatar image Beatriz Aof commented ·
I keep ambulances at the list because although they are travelling to their home base, they can be assign to an emergency and therefore interrupt that activity. If only I push them to the list at the end I won´t be able to do this
0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Beatriz Aof commented ·

One thing you could do is split the tokens, having one child push the ambulance back on the list while the other token transports the ambulance back to base. If there's a pull from the list, the tokens that are going home will stop and be preempted by the more important emergency. Otherwise, an ambulance will travel all the way back to base.

1661203333257.png

0 Likes 0 ·
1661203333257.png (27.7 KiB)
Beatriz Aof avatar image Beatriz Aof Kavika F ♦ commented ·
That worked!!! But now I have another issue, I want to sort backorders based on call priority and this information is stored in token label Priority. My pullers are the emergency location so then I think I would have to assign labels to pullers, how can I do this?
0 Likes 0 ·
Show more comments