The Elevator Control System
CS 3371 - Spring Semester, 2000
Our task is to design software to schedule and control
passenger elevators in a multistory building.
Elevator operation should be intuitive and accessible to diverse users.
Elevator scheduling should be efficient and fair.
When someone calls an elevator, the next elevator traveling
the right direction that reaches the person's floor should stop there.
No request for an elevator should be delayed indefinitely. If an
elevator has no passengers and no outstanding requests,
it should remain on its current floor.
An elevator should not reverse direction until all its passengers
have reached their floors going in the current direction.
Elevators should also be safe.
If an elevator is at capacity, it should not respond to new calls.
If it is overfilled, it should not leave its current floor.
A supervisor should be able to monitor the elevators, so the system should
report on their current status.
Several concepts are important in understanding elevator control systems.
- Elevator scheduling is asynchronous and floor-based: the schedule for each elevator is set independently as the elevator approaches each floor.
- Scheduling vs. dispatching: Scheduling means making decisions about elevator behavior when the system gets requests or an elevator approaches a floor. Dispatching means initiating a particular behavior of a particular elevator.
- Status direction vs. actual direction: The actual and status directions of a moving elevator are the same, either up or down. When an elevator is stopped at a floor, its actual direction is none, but if it has a pending destinatio
n, its status direction is the direction it will move when it leaves the floor. If a stopped elevator has no pending destination, its status direction is also none.
- Scheduled floor: If an elevator must stop at a given floor to answer a call or drop off a passenger, that floor is a scheduled floor for that elevator. We can determine if a floor is scheduled for an elevator based on the elevator's pending destinatio
ns and actual and status directions, and on the floor's pending calls.
- Stop and emergency requests: Elevator passengers may issue stop and emergency requests. If an elevator is at a floor with its door open, a stop request holds the elevator at that floor with open door until the stop request terminates. An emergency req
uest stops the elevator at the next floor it reaches and turns on the elevator's alarm. The elevator stays at that floor with the alarm going until the emergency request terminates.
(Adapted from Case Studies in Object-Oriented Analysis and Design, by Yourdan and Argila.)