AI Discussion: The Logic Behind Elevator Dispatching
-
How exactly do elevators manage to fulfill requests from different floors?
The temperature difference inside and outside your bed made you wake up 20 minutes later than usual. You quickly washed your face, brushed your teeth, and called a ride-hailing service while putting on your shoes.
After being stuck in traffic for a long time, you rushed into the building as soon as you got out of the car, because you were only 5 minutes away from being late—and a late arrival would cost you a 100-yuan deduction from your salary.
Luckily, two elevators were ascending from the -2nd floor. You sighed in relief, thinking you could clock in on your floor in just 3 minutes.
You glanced at the numbers displayed next to the elevator buttons: -2, -1, 2, 3, 4… The elevator was already full by the time it reached the -1st floor…
Some floors are left dry, others flooded—who the ** designed this elevator…
This scenario has happened more than once. Maybe there are 10 elevators running in the building, but you still end up waiting for 10 minutes without catching one. Countless times, the elevator passes by your floor without stopping, as if you’ve been blacklisted.
You can’t help but wonder: Is it a distortion of human nature, or is the elevator design just stupid? How exactly do elevators manage to fulfill requests from different floors?
This painful experience and contemplation eventually led to this article: How are elevators dispatched?
There are four basic dispatching logics for elevators, with the fourth being the most commonly used today. To achieve optimal efficiency for a single elevator, many factors must be considered; for multiple elevators, the logic becomes even more complex.
Below, we’ll introduce:
-
First-Come, First-Served (FCFS): The elevator serves requests in the order they are made.
- Advantages: Fair, just, and transparent. Every passenger’s request is processed in sequence, ensuring no one is left waiting indefinitely.
- Disadvantages: Extremely inefficient during peak hours, leading to long queues and collective frustration.
- Feasibility: No.
-
Shortest Distance First: The elevator serves the closest request first.
- Advantages: Reduces unnecessary trips compared to FCFS.
- Disadvantages: Passengers on remote floors (e.g., the top floor) may wait endlessly (e.g., an hour) for the elevator to arrive.
- Feasibility: No.
-
Round-Trip Between Top and Bottom Floors: The elevator moves back and forth between the top and bottom floors, picking up passengers heading in the same direction. (Like a bus: 1→20, 20→1, repeating, picking up passengers along the way.)
- Advantages: Efficiently handles passengers going in the same direction in one trip.
- Disadvantages: The elevator must reach the top or bottom floor before turning around, even if empty.
- Feasibility: Yes.
-
Improved Round-Trip: The elevator moves between the highest and lowest requested floors, turning around at the highest requested floor instead of the top floor. (Similar to 3, but if no one is going to the 20th floor, the elevator can turn around at the highest requested floor, e.g., 19th.)
- Advantages: More flexible than the basic round-trip, avoiding unnecessary trips to the top/bottom floor.
- Disadvantages: Still rigid, as it must complete all requests in one direction before turning around.
- Feasibility: Yes. Most elevators today use this logic.
The above covers the most basic elevator dispatching logics. By now, you’ve likely understood the most common logic in use today: Option 4.
However, let’s explore further optimizations for scenarios like the following:
First, define "optimal efficiency": Minimizing the total time spent by all users (waiting + riding) while ensuring no one has an extremely poor experience.
Mathematically: Choose the plan with min(sum(waiting time + riding time)). By assigning time estimates to each step, the algorithm can quickly evaluate options and select the most efficient one.
As mentioned earlier, most elevators today use Option 4 (improved round-trip). Let’s test its efficiency:
Example: A single elevator reaches the 4th floor, empties, and receives simultaneous "up" requests from the 3rd and 20th floors. Should it descend to pick up the 3rd-floor passenger or continue ascending?
Option 4 isn’t the most efficient here. The optimal choice is the one that minimizes total time. However, frequent direction changes (e.g., 1→10→9→30) can confuse passengers and disrupt order and safety.
Thus, modern elevators prioritize a balance between efficiency and experience: The elevator moves in one direction, picks up passengers along the way, and only turns around after reaching the highest requested floor.
For multiple elevators, the logic is similar but involves coordination ("group control"). Group control considers more factors and employs advanced algorithms:
- Expert System-Based Group Control: Uses expert rules to select the best route.
- Fuzzy Logic Group Control: Applies fuzzy rules for uncertain scenarios.
- Neural Network-Based Group Control: Uses AI to learn and adapt to traffic patterns.
- Fuzzy Neural Network Group Control: Combines fuzzy logic and neural networks for better rule optimization.
This article provides a basic introduction to elevator dispatching. For deeper insights, further research is recommended.
-