What if your elevator always knew exactly when and where to come, making your wait almost disappear?
Why Multiple elevator coordination in LLD? - Purpose & Use Cases
Start learning this pattern below
Jump into concepts and practice - no test required
Imagine a tall building with many floors and several elevators. Without a smart system, each elevator works on its own, picking random requests. People press buttons, but elevators might come late or go empty to floors where no one waits.
Manually controlling elevators means slow response and confusion. Elevators may waste time going up and down unnecessarily. People get frustrated waiting too long. It's hard to keep track of all requests and assign elevators efficiently by hand.
Multiple elevator coordination uses a smart system to assign elevators to requests. It tracks all calls and decides which elevator can serve best, reducing wait times and energy waste. This system balances loads and moves elevators smoothly like a well-organized team.
onButtonPress(floor): call nearest elevator elevator moves to floor no coordination between elevators
onButtonPress(floor):
assign elevator based on current positions and directions
update elevator schedules
elevators coordinate to serve requests efficientlyIt enables fast, fair, and energy-saving elevator service that feels natural and reduces waiting frustration.
In a busy office tower, multiple elevator coordination ensures people reach meetings on time by smartly directing elevators to floors with waiting passengers, avoiding empty rides and long waits.
Manual elevator control causes delays and inefficiency.
Coordinated systems assign elevators smartly to reduce wait times.
Better coordination improves user experience and saves energy.
Practice
Solution
Step 1: Understand elevator coordination purpose
Multiple elevator coordination aims to improve efficiency by reducing passenger wait and travel times.Step 2: Evaluate options based on goal
Options B, C, and D do not focus on improving passenger experience or efficiency.Final Answer:
To reduce wait and travel times for passengers -> Option AQuick Check:
Goal of coordination = reduce wait/travel times [OK]
- Confusing coordination with adding more elevators
- Thinking elevators should stay idle
- Assuming random movement improves service
Solution
Step 1: Understand assignment criteria
Elevators should be assigned based on proximity and direction to minimize wait time.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.Final Answer:
Assign the elevator closest to the request floor moving in the same direction -> Option CQuick Check:
Closest elevator + direction match = correct assignment [OK]
- Ignoring elevator direction when assigning
- Choosing elevators randomly
- Always picking ground floor elevator
Solution
Step 1: Analyze elevator positions and directions
Elevator A is at floor 3 going up; Elevator B is at floor 6 going down.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.Final Answer:
Elevator A -> Option DQuick Check:
Elevator moving towards request floor in same direction = Elevator A [OK]
- Choosing elevator moving away from request
- Ignoring elevator direction
- Assuming either elevator works
Solution
Step 1: Identify cause of stuck elevator in system
If elevator position is not updated, controller cannot assign requests properly.Step 2: Determine fix
Adding regular position updates and health checks ensures controller has current elevator status to assign requests correctly.Final Answer:
Elevator state not updated; add regular position updates and health checks -> Option AQuick Check:
Missing updates cause stuck state; fix with health checks [OK]
- Assuming hardware failure without checking software updates
- Blaming random assignment logic
- Ignoring elevator state updates
Solution
Step 1: Understand peak hour challenges
High traffic causes many requests; serving all floors equally can cause delays and conflicts.Step 2: Evaluate zoning strategy
Dividing floors into zones and assigning elevators reduces travel distance and wait time by localizing service.Step 3: Compare other options
Random assignment or no zoning causes inefficiency; keeping elevators idle wastes capacity.Final Answer:
Divide floors into zones and assign elevators to zones dynamically -> Option BQuick Check:
Zoning elevators reduces wait time in tall buildings [OK]
- Ignoring zoning benefits in tall buildings
- Assuming random assignment balances load
- Keeping elevators idle wastes capacity
