Class ElevatorStrategy
java.lang.Object
org.simplesim.examples.elevator.shared.ElevatorStrategy
Class encapsulating the elevator steering logic.
The elevator follows one of the earliest strategies for elevator control systems called collective control: Each floor is equipped with buttons representing the directions up and down. The elevator cabin keeps track of all the calls made in the same direction, collecting all passengers going in the same direction. The cabin then reverse and collects all passengers going in the opposite direction.
This class only contains the steering logic, agent-specific functionality (messaging, event management,...) is part of the elevator implementations. Thus, dynamic and static elevator both use the same strategy.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
processMoveEvent
(Time time) Prepares the next movement of the elevator and evaluates all necessary information
-
Constructor Details
-
Method Details
-
processMoveEvent
Prepares the next movement of the elevator and evaluates all necessary information- Parameters:
time
- current time stamp
-