question

Raul V avatar image
0 Likes"
Raul V asked Raul V answered

Waiting Lines by distance and Capacity

Hi @Matthew Gillespie

I love your answer below;

https://answers.flexsim.com/questions/88061/multiple-waiting-lines-and-max-capacity-of-waiting.html

but i would like to know how i can do the same for distance and qty? ( qty already did based in your example)


Basically, im looking to create a model with waiting lines but they are chossing between distance and qty of the line, could you please elabore :)


thanks a lot

R.V

FlexSim 24.2.0
process flowpeople modulewaiting lines
5 |100000

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

Nil Ns avatar image
1 Like"
Nil Ns answered

Hello Raul,


I am not sure if there is an easiest method to do that, but I can show you my method.


To get the distance, you will need to save a label for the patient token. You will need to add assigned labels like this:

1724756040747.png


(Note that the name of the label doesn't need to be "patient"; it could be whatever you want.)

Then, in the advanced options in the WaitingLine, you will need to add a distance from FixedResource:

1724756311929.png


Unfortunately, you will need to modify the code a little to make it work.

1724756374823.png

By clicking on the code button, you will see the code. You will need to add this code to ensure that it calculates the distance between the patient and the line:

puller = puller.patient;

1724756472091.png

(If you created the label on the token with another name, you will need to replace "patient" with that name.)

Then click on "OK" and "OK" again to close the pop-ups.


Finally, you will need to add the Query in the WaitingLine options:

WHERE queueSize < 5 ORDER BY queueSize ASC, distance ASC

Now FlexSim will order the WaitingLines by the queueSize, and if they are the same, it will order them by distance.

waitinglinecapacity_1.fsm

Thank you!


5 |100000

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

Raul V avatar image
0 Likes"
Raul V answered

Thank you...this is what i need.

:)


5 |100000

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