question

Shinya O avatar image
0 Likes"
Shinya O asked Shinya O commented

How to get the length of the waiting queue for each floor

Hi,

I would like to get the length of the waiting queue for each floor, and to decide whether to use the elevator or the stairs depending on the status.

For example, if an operator on the 1st floor needs to move to another floor, is it possible to use the stairs if the queue length for the 1st floor elevator is greater than the threshold?

I also attach the model.Elevator_and_Stairs.fsm

Thanks in advance.

FlexSim 23.0.8
astarastar navigatorelevator bankstairs
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

·
Jonah K avatar image
1 Like"
Jonah K answered Shinya O commented

You could use a Tracked Variable to record the number of people waiting for/using the elevator. In the attached model, Queue3 has a trigger that will increment TrackedVariable1 whenever a person enters the queue. Then ElevatorBank1 will decrement TrackedVariable1 whenever a person "continues" or leaves the elevator. That way TrackedVariable1 keeps track of how many people are using the elevator.

To decide where to send the people, I used a Send to Conditional Port for Source1, with this condition:

TrackedVariable("TrackedVariable1").value <= getvarnum(Model.find("Elevator Bank1"), "capacity")

If the tracked variable is less than or equal to a number (e.g. the max capacity of Elevator Bank1), then it will send the person to the queue by the elevator. If not, then it will send the person to the queue by the stairs. Hope this helps you in making your model.

ConditionalElevatorStairsRoute.fsm


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

Shinya O avatar image Shinya O commented ·

Thank you for your model. This is exactly what I want to do.

0 Likes 0 ·
Shinya O avatar image Shinya O commented ·

Your idea is good, but it won't work if there are elevators and stairs nearby. I tried to put Queue2 near the landing of the stairs, but it did not work as expected. Do you have any ideas?

0 Likes 0 ·
Jonah K avatar image Jonah K ♦ Shinya O commented ·

I made a couple changes. Is this more like what you were expecting?

elevator-and-stairs_JK.fsm

0 Likes 0 ·
Shinya O avatar image Shinya O Jonah K ♦ commented ·

I apologize for the confusion caused by the slight change in the model I attached at the beginning (Elevator_and_Stairs.fsm) and my current question.

What I want to know now is about the case where the elevator and the stairs are near each other as shown in the figure below.

1693795612202.png

It would be nice if it could be achieved without setting a virtual distance.

0 Likes 0 ·
1693795612202.png (121.5 KiB)
Show more comments

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.