What is the algorithm for 2 elevators in a 17-story building?

Imagine you’re in a 17-story building with two elevators. You’re on the 1st floor and press the button to go up. Elevator #1 is on the 14th floor coming down, Elevator #2 is on the 3rd floor going up. Subsequently to you pushing the up button to call the elevator, people on floor 13 and lower have pressed the button to go down.

So, what is the priority? Elevator #1 is already on its way down, so it does it stop to pick up passengers on each floor? Or does it respond to the initial instruction of going to the 1st floor to take a passenger up?

What are the codified priorities of an elevator? First-come first-served? Efficiency? A mixture of both? And who decided this? And how?



Discover more from xioma

Subscribe now to keep reading and get access to the full archive.

Continue reading