question

tzu-ting avatar image
0 Likes"
tzu-ting asked Jason Lightfoot commented

How to choose the elevator randomly

Hi,
I am building a model for passengers to use elevators. The model consists of a total of six elevators, and I plan to allow passengers to board an elevator from the first floor and go up to their desired destination floor. How can I set it up so that passengers can randomly choose to board any one of the elevators, rather than having a fixed elevator for each trip?1698558583087.png

FlexSim 23.1.0
patient flowrandomelevators
1698558583087.png (228.2 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.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @tzu-ting, was Jonah K's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jonah K avatar image
0 Likes"
Jonah K answered

Here are two options:

You could 'A' Connect them from the previous location and under Output > Send To Port, select Random Port.

If you are using ProcessFlow to move your passengers, you can add all the elevators to a group, then get a random elevator in that group with:

Group("Group1")[duniform(1, Group("Group1").length)]

This code can be used in the Destination field of a travel task.

If you need more specific advice, please attach your model or a model demonstrating the situation.

5 |100000

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