I am currently developing a model for a hospital elevator waiting system. The basic scenario is that passengers enter the system from GlassDoor on each floor, whereupon the system assigns a specific elevator for them to ride. Once passengers reach their destination floor, they exit the system through the GlassDoor as well.
Currently, the system assigns a specific elevator to each passenger, who then waits for that elevator and can only board it, regardless of the wait time. However, in reality, in most cases, as long as another elevator serving the same floor arrives, passengers can also board a different elevator, rather than strictly adhering to a one-to-one assignment concept. Therefore, I am wondering if it is possible to change the process flow to achieve this effect.
My idea is to first establish a common queue: on the left side, there will be a queue in front of the three elevators for passengers to wait, and on the right side, there will be another queue for the other three elevators. How can I make the token wait for any elevator to arrive at the current floor? If an elevator arrives, then check if it can reach the target floor; if so, allow the passenger to board that elevator.
I have attached the current model below, and I hope someone can assist me with this. Thank you!
current ver..fsm