System Design: Single-Elevator Control for a 4-Stop Building
Context
You are designing the control policy for a single elevator serving four stops: Basement (B), Floor 1, Floor 2, and Floor 3. The goal is to minimize passenger waiting time (from pressing a hall button to doors opening) and travel time (time inside the car until destination).
Assumptions:
-
One car; no mechanical constraints beyond standard door times and acceleration.
-
Hall calls have direction (Up/Down); passengers select destination inside the car.
-
Ignore failures; assume typical door dwell and floor-to-floor travel times.
Task
Design the elevator’s decision policy for choosing its next stop. Describe:
-
How the car decides its next stop while moving.
-
How it reverses direction.
-
How it handles opposite-direction hall calls.
-
How it behaves when idle (no requests).
-
Any tie-breakers and fairness rules to minimize waiting and travel time.