question

Tomi Kosunen avatar image
0 Likes"
Tomi Kosunen asked Tomi Kosunen commented

ElevatorBank queue time

Hi. I'm using ElevatorBank module from People library. I need to get the queue time of the traveller. How can I do that?


In my model, the traveller if first routed close to the elevatorbank. The queue time starts when the traveller is sent out from the queue and should end when the traveller get into the elevator car. It seems that there is no event when traveller arrives to the car. The arrival event fires when traveller is in front of elevator bank (and starts waiting).

I have found two possible ways to solve this (but not succeed):

1) create event triggered source and link it to elevatorbank trigger "OnElevatorTravelerEntry". It might work but the source needs the elevator rank as parameter. I have hundreds of elevators and the number varies in every scenario. It is impossible to create ProcessFlow source for each elevator. Is it possible lo listen all of the "OnElevatorTravelerEntry" events somehow?

2) I noticed that creating the event triggered source, creates node "onTravelerEntry" to the EvelvatorBank/Elevator1/variables. It is some kind of coupling node. Is it possible to write flexscript code in it? That would be nice.

Pls find the model template attached.

elebank_testing.fsm

FlexSim 21.2.0
elevator bank
elebank-testing.fsm (36.3 KiB)
· 2
5 |100000

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

Tomi Kosunen avatar image Tomi Kosunen commented ·

Forgot to mention one possibility - using the ElevatorBank request list: when the request onElevator turns 1, then the traveller is in and the queue time can be reported. I just couldn't find the way to get it work.

0 Likes 0 ·
Ryan Clark avatar image Ryan Clark commented ·

Hi @Tomi Kosunen, was Felix Möhlmann'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 unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Tomi Kosunen commented

I got your second idea to work. You can toggle the "onTravelerEntry" as Flexscript node (right click -> Build -> Toggle Node as Flexscript) and add text data to it to write code in it (right click -> Node -> Add Text Data).

From the event-triggered source I guessed that the event has access to the traveler as a parameter (since you can assign it there) and use it to send a message to the process flow.

There I create a token for each person that then wait until a message with the corresponding person as parameter is received. The time since the creation then determines the wait time.

Elevators that get added after the node was adjusted in the first, will be created with the same node (apparently FlexSim just copies the first elevator).

If the bank is already in place, the code in the script window in the attached model should copy the node to all other elevators after it was adjusted in the first.

elebank-testing_fm.fsm


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

Tomi Kosunen avatar image Tomi Kosunen commented ·

Thanks @Felix Möhlmann This is perfect solution for me. Only if the trigger could be set thru UI, would be better


0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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