Elevator Control System Design (N floors, M elevators)
Context
You are designing a multi-elevator control system for a building with N floors (1..N) and M elevators. Users generate two types of requests:
-
Hall calls: from a floor, pressing Up or Down to request pickup.
-
Car calls: inside an elevator, pressing a destination floor for dropoff.
Assume each elevator has sensors for door state, weight/load, current floor/position, and fault signals.
Requirements
-
Model core classes and entities:
-
Elevator, Door, Floor, Request (HallCall, CarCall), Controller, Scheduler.
-
Define key methods and interfaces:
-
requestPickup(floor, direction)
-
requestDropoff(floor)
-
step()/tick()
-
getStatus()
-
Choose and justify a scheduling strategy (e.g., nearest-car, SCAN/LOOK/collective-control, hybrid).
-
Describe state machines and transitions for elevator and door.
-
Handle concurrency and multiple simultaneous requests.
-
Address priority and fairness (avoid starvation, balance load).
-
Error handling and safety (overload, door obstruction, stuck elevator, out-of-service).
-
Extensibility and service modes (e.g., VIP, fire service, maintenance).
-
Provide class interfaces or language-agnostic pseudocode for main operations.