Bird
Raised Fist0
LLDsystem_design~15 mins

Multiple elevator coordination in LLD - Deep Dive

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Overview - Multiple elevator coordination
What is it?
Multiple elevator coordination is the system design that manages how several elevators in a building work together efficiently. It decides which elevator should respond to each call to minimize wait and travel times. This coordination ensures smooth movement of people between floors without unnecessary delays or energy waste.
Why it matters
Without coordinated elevators, people would face long waits and crowded lifts, causing frustration and inefficiency. Buildings with many floors and heavy traffic need smart coordination to keep people moving quickly and safely. This system improves user experience and optimizes energy use, which is crucial in busy buildings like offices or hotels.
Where it fits
Before learning this, you should understand basic elevator operation and simple single-elevator control. After this, you can explore advanced scheduling algorithms, real-time optimization, and integration with building management systems.
Mental Model
Core Idea
Multiple elevator coordination is about smartly assigning elevator cars to calls so that overall waiting and travel times are minimized while balancing load and energy use.
Think of it like...
Imagine a team of taxi drivers in a city. Each driver picks up passengers based on who is closest and which route is fastest, so no one waits too long and no driver wastes time driving empty.
┌───────────────┐       ┌───────────────┐       ┌───────────────┐
│ Elevator Car 1│──────▶│ Assigned Calls│       │ Elevator Car 2│──────▶│ Assigned Calls│
└──────┬────────┘       └──────┬────────┘       └──────┬────────┘
       │                       │                       │
       ▼                       ▼                       ▼
  ┌───────────┐           ┌───────────┐           ┌───────────┐
  │ Call Queue│           │ Call Queue│           │ Call Queue│
  └───────────┘           └───────────┘           └───────────┘
       ▲                       ▲                       ▲
       │                       │                       │
┌──────┴────────┐       ┌──────┴────────┐       ┌──────┴────────┐
│ Call Requests │──────▶│ Coordination │──────▶│ Scheduling   │
└───────────────┘       └──────────────┘       └──────────────┘
Build-Up - 7 Steps
1
FoundationBasic elevator call handling
🤔
Concept: Learn how a single elevator responds to calls from floors and inside the car.
A single elevator has a queue of floor requests. It moves in one direction, stopping at requested floors. When no requests remain, it waits idle. Calls from floors add to the queue, and passengers inside select destination floors.
Result
The elevator serves calls one by one, moving up or down as needed.
Understanding single elevator call handling is essential before coordinating multiple elevators because it shows how requests translate into movement.
2
FoundationElevator states and directions
🤔
Concept: Elevators have states like moving up, moving down, or idle, which affect how they accept new calls.
An elevator moving up will usually accept calls from floors above its current position going up. It ignores calls in the opposite direction until it finishes current requests. Idle elevators can accept any call.
Result
Elevators avoid unnecessary direction changes, improving efficiency.
Knowing elevator states helps in designing coordination logic that respects current movement to reduce delays.
3
IntermediateCall assignment in multiple elevators
🤔Before reading on: do you think calls should always go to the closest elevator or the one with the fewest stops? Commit to your answer.
Concept: Assigning calls to elevators involves choosing which elevator can serve a call fastest and with least disruption.
When a call is made, the system evaluates all elevators based on their current position, direction, and load. It assigns the call to the elevator that can reach the caller soonest without reversing direction unnecessarily. This reduces wait times and balances usage.
Result
Calls are distributed among elevators to optimize overall service.
Understanding call assignment criteria prevents naive solutions that cause longer waits or inefficient elevator movement.
4
IntermediateHandling peak traffic and load balancing
🤔Before reading on: do you think sending all elevators to the busiest floor is best, or spreading them out? Commit to your answer.
Concept: During busy times, elevators must be coordinated to handle many calls efficiently and avoid crowding one elevator.
The system monitors traffic patterns and distributes calls to balance load. For example, during morning rush, some elevators may be dedicated to going up only, while others handle down calls. This prevents bottlenecks and improves throughput.
Result
Elevators serve passengers faster and avoid overcrowding.
Knowing how to balance load during peak times is key to maintaining smooth elevator service in real buildings.
5
IntermediateUsing predictive scheduling algorithms
🤔
Concept: Advanced systems predict future calls based on patterns to optimize elevator assignments proactively.
By analyzing historical data and current trends, the system anticipates where calls will come from. It pre-positions elevators near busy floors or adjusts schedules to reduce wait times before calls arrive.
Result
Elevator response times improve and energy use decreases.
Understanding prediction helps design smarter coordination that adapts to real-world usage.
6
AdvancedReal-time coordination with communication
🤔Before reading on: do you think elevators operate independently or share data continuously? Commit to your answer.
Concept: Elevators communicate their status and calls in real-time to coordinate dynamically.
Each elevator sends updates about position, direction, and load to a central controller or peer elevators. The controller adjusts assignments instantly as conditions change, such as new calls or elevator faults.
Result
The system adapts quickly, maintaining efficiency and safety.
Knowing real-time communication is crucial for robust, responsive elevator coordination.
7
ExpertHandling failures and edge cases
🤔Before reading on: do you think elevator coordination systems handle faults automatically or require manual intervention? Commit to your answer.
Concept: Robust systems detect elevator faults and reassign calls to maintain service without disruption.
If an elevator breaks down or is out of service, the system reroutes calls to other elevators. It also handles unusual situations like emergency stops or priority overrides. This requires fault detection, fallback logic, and safety checks.
Result
Elevator service continues smoothly despite failures.
Understanding fault tolerance is vital for designing real-world systems that users can trust.
Under the Hood
Multiple elevator coordination uses a central controller or distributed agents that track elevator states and call requests. It runs scheduling algorithms that evaluate elevator positions, directions, and loads to assign calls optimally. Communication protocols keep elevator cars and the controller synchronized in real-time. The system balances minimizing wait times, travel times, and energy consumption while handling dynamic changes and faults.
Why designed this way?
This design evolved to solve inefficiencies in naive elevator systems where calls were served by the closest elevator without considering direction or load. Centralized or distributed coordination allows global optimization rather than local decisions. Tradeoffs include complexity versus responsiveness. Alternatives like fixed zoning were rejected because they reduce flexibility and increase wait times.
┌───────────────┐       ┌───────────────┐       ┌───────────────┐
│ Call Requests │──────▶│ Coordination │──────▶│ Elevator Cars │
└──────┬────────┘       └──────┬────────┘       └──────┬────────┘
       │                       │                       │
       ▼                       ▼                       ▼
┌───────────────┐       ┌───────────────┐       ┌───────────────┐
│ Scheduler    │◀──────│ Status Updates│◀──────│ Elevator Sensors│
└───────────────┘       └───────────────┘       └───────────────┘
Myth Busters - 4 Common Misconceptions
Quick: Is the closest elevator always the best choice for a call? Commit yes or no.
Common Belief:The closest elevator to a call should always serve it to minimize wait time.
Tap to reveal reality
Reality:Sometimes an elevator farther away but moving in the right direction or less loaded serves the call faster overall.
Why it matters:Choosing only the closest elevator can cause longer waits and inefficient elevator movement.
Quick: Do elevators operate independently without sharing data? Commit yes or no.
Common Belief:Each elevator works alone and only responds to calls it receives directly.
Tap to reveal reality
Reality:Elevators share status and calls through a coordination system to optimize overall service.
Why it matters:Ignoring coordination leads to duplicated effort and poor user experience.
Quick: Does assigning all elevators to the busiest floor improve service? Commit yes or no.
Common Belief:Sending all elevators to the busiest floor during peak times is best to clear crowds quickly.
Tap to reveal reality
Reality:Spreading elevators across floors and directions balances load and reduces wait times for everyone.
Why it matters:Concentrating elevators causes bottlenecks and longer waits on other floors.
Quick: Can elevator coordination ignore faults safely? Commit yes or no.
Common Belief:Elevator faults are rare and do not need special handling in coordination.
Tap to reveal reality
Reality:Fault detection and dynamic reassignment are essential to maintain safe and continuous service.
Why it matters:Ignoring faults risks passenger safety and system downtime.
Expert Zone
1
Elevator coordination algorithms often balance multiple objectives like wait time, travel time, energy use, and wear on equipment, requiring multi-criteria optimization.
2
Distributed coordination where elevators communicate peer-to-peer can improve fault tolerance but adds complexity compared to centralized control.
3
Predictive scheduling uses machine learning models trained on building-specific traffic patterns, which can adapt over time for better performance.
When NOT to use
In very small buildings with only one or two elevators, complex coordination adds unnecessary overhead. Simple single-elevator control or fixed zoning may suffice. Also, in buildings with very low traffic, coordination benefits are minimal.
Production Patterns
Real-world systems use hierarchical control with a central scheduler and local elevator controllers. They implement priority overrides for emergency or VIP calls and integrate with building security and fire systems. Load sensors and destination dispatch systems improve efficiency by grouping passengers with similar destinations.
Connections
Distributed Systems
Multiple elevators coordinate like distributed nodes sharing state and tasks.
Understanding distributed consensus and communication helps design robust elevator coordination that handles failures and dynamic changes.
Traffic Signal Control
Both systems optimize flow and reduce wait times by scheduling resources dynamically.
Learning traffic light timing algorithms informs elevator scheduling strategies for peak and off-peak periods.
Operations Research
Elevator coordination applies optimization and scheduling theories from operations research.
Knowing linear programming and queuing theory deepens understanding of how to minimize wait and travel times.
Common Pitfalls
#1Assigning calls only based on elevator proximity without considering direction or load.
Wrong approach:if call_floor < elevator_floor: assign_call_to_elevator() else: ignore_call()
Correct approach:Evaluate all elevators' direction, load, and position; assign call to elevator minimizing wait and travel time.
Root cause:Misunderstanding that proximity alone does not guarantee fastest service.
#2Ignoring real-time updates and not reassigning calls when conditions change.
Wrong approach:Assign calls once and never update assignments even if elevators break down or new calls appear.
Correct approach:Continuously monitor elevator states and reassign calls dynamically to adapt to changes.
Root cause:Assuming static scheduling is sufficient in a dynamic environment.
#3Sending all elevators to the same floor during peak times.
Wrong approach:for elevator in elevators: elevator.go_to(lobby_floor)
Correct approach:Distribute elevators to serve up and down calls separately and spread across floors.
Root cause:Over-simplifying peak traffic handling without load balancing.
Key Takeaways
Multiple elevator coordination optimizes which elevator serves each call to reduce wait and travel times.
Effective coordination considers elevator direction, load, and position, not just proximity.
Real-time communication and dynamic scheduling are essential for responsive and efficient service.
Handling peak traffic and faults requires specialized strategies to maintain smooth operation.
Advanced systems use prediction and distributed control to further improve performance and reliability.

Practice

(1/5)
1. What is the main goal of multiple elevator coordination in a building?
easy
A. To reduce wait and travel times for passengers
B. To increase the number of elevators in the building
C. To make elevators move randomly
D. To keep all elevators idle at the ground floor

Solution

  1. Step 1: Understand elevator coordination purpose

    Multiple elevator coordination aims to improve efficiency by reducing passenger wait and travel times.
  2. Step 2: Evaluate options based on goal

    Options B, C, and D do not focus on improving passenger experience or efficiency.
  3. Final Answer:

    To reduce wait and travel times for passengers -> Option A
  4. Quick Check:

    Goal of coordination = reduce wait/travel times [OK]
Hint: Focus on passenger experience improvement goals [OK]
Common Mistakes:
  • Confusing coordination with adding more elevators
  • Thinking elevators should stay idle
  • Assuming random movement improves service
2. Which of the following is a correct way to assign an elevator to a new request in a multiple elevator system?
easy
A. Always assign the elevator on the ground floor
B. Assign the elevator farthest from the request floor regardless of direction
C. Assign the elevator closest to the request floor moving in the same direction
D. Assign elevators randomly to balance usage

Solution

  1. Step 1: Understand assignment criteria

    Elevators should be assigned based on proximity and direction to minimize wait time.
  2. Step 2: Analyze options

    Assign the elevator closest to the request floor moving in the same direction matches this logic. Options A, B, and C ignore direction or proximity, causing inefficiency.
  3. Final Answer:

    Assign the elevator closest to the request floor moving in the same direction -> Option C
  4. Quick Check:

    Closest elevator + direction match = correct assignment [OK]
Hint: Match elevator direction and proximity for assignment [OK]
Common Mistakes:
  • Ignoring elevator direction when assigning
  • Choosing elevators randomly
  • Always picking ground floor elevator
3. Consider a system with 2 elevators: Elevator A at floor 3 moving up with destinations [5, 7], Elevator B at floor 6 moving down with destinations [4, 2]. A request comes from floor 4 to go up. Which elevator should be assigned?
medium
A. Neither elevator
B. Elevator B
C. Either elevator
D. Elevator A

Solution

  1. Step 1: Analyze elevator positions and directions

    Elevator A is at floor 3 going up; Elevator B is at floor 6 going down.
  2. Step 2: Match request direction and elevator direction

    Request is at floor 4 going up. Elevator A is below floor 4 and moving up, so it can pick up on the way. Elevator B is above floor 4 but moving down, so it cannot pick up going up.
  3. Final Answer:

    Elevator A -> Option D
  4. Quick Check:

    Elevator moving towards request floor in same direction = Elevator A [OK]
Hint: Pick elevator moving towards request floor in same direction [OK]
Common Mistakes:
  • Choosing elevator moving away from request
  • Ignoring elevator direction
  • Assuming either elevator works
4. In a multiple elevator system, the controller assigns requests but sometimes an elevator gets stuck and does not update its position. What is the likely problem and how to fix it?
medium
A. Elevator state not updated; add regular position updates and health checks
B. Elevator hardware failure; replace elevator immediately
C. Controller assigns requests randomly; fix assignment logic
D. Elevator doors stuck open; fix door sensors

Solution

  1. Step 1: Identify cause of stuck elevator in system

    If elevator position is not updated, controller cannot assign requests properly.
  2. Step 2: Determine fix

    Adding regular position updates and health checks ensures controller has current elevator status to assign requests correctly.
  3. Final Answer:

    Elevator state not updated; add regular position updates and health checks -> Option A
  4. Quick Check:

    Missing updates cause stuck state; fix with health checks [OK]
Hint: Ensure elevator regularly reports position to controller [OK]
Common Mistakes:
  • Assuming hardware failure without checking software updates
  • Blaming random assignment logic
  • Ignoring elevator state updates
5. You are designing a multiple elevator coordination system for a 20-floor building with 4 elevators. To minimize average wait time during peak hours, which strategy is best?
hard
A. Assign elevators randomly to requests to balance load
B. Divide floors into zones and assign elevators to zones dynamically
C. Let all elevators serve all floors equally without zoning
D. Keep all elevators idle at ground floor until called

Solution

  1. Step 1: Understand peak hour challenges

    High traffic causes many requests; serving all floors equally can cause delays and conflicts.
  2. Step 2: Evaluate zoning strategy

    Dividing floors into zones and assigning elevators reduces travel distance and wait time by localizing service.
  3. Step 3: Compare other options

    Random assignment or no zoning causes inefficiency; keeping elevators idle wastes capacity.
  4. Final Answer:

    Divide floors into zones and assign elevators to zones dynamically -> Option B
  5. Quick Check:

    Zoning elevators reduces wait time in tall buildings [OK]
Hint: Use zoning to reduce travel distance and wait time [OK]
Common Mistakes:
  • Ignoring zoning benefits in tall buildings
  • Assuming random assignment balances load
  • Keeping elevators idle wastes capacity