Class Warrant

All Implemented Interfaces:
PropertyChangeListener, Comparable<NamedBean>, EventListener, PropertyChangeProvider, NamedBean, ThrottleListener
Direct Known Subclasses:
SCWarrant

public class Warrant
extends AbstractNamedBean
implements ThrottleListener, PropertyChangeListener
An Warrant contains the operating permissions and directives needed for a train to proceed from an Origin to a Destination. There are three modes that a Warrant may execute;

MODE_LEARN - Warrant is created or edited in WarrantFrame and then launched from WarrantFrame who records throttle commands from "_student" throttle. Warrant fires PropertyChanges for WarrantFrame to record when blocks are entered. "_engineer" thread is null.

MODE_RUN - Warrant may be launched from several places. An array of BlockOrders, _savedOrders, and corresponding _throttleCommands allow an "_engineer" thread to execute the throttle commands. The blockOrders establish the route for the Warrant to acquire and reserve OBlocks. The Warrant monitors block activity (entrances and exits, signals, rogue occupancy etc) and modifies speed as needed.

MODE_MANUAL - Warrant may be launched from several places. The Warrant to acquires and reserves the route from the array of BlockOrders. Throttle commands are done by a human operator. "_engineer" and "_throttleCommands" are not used. Warrant monitors block activity but does not set _stoppingBlock or _shareTOBlock since it cannot control speed. It does attempt to realign the route as needed, but can be thwarted.

Version 1.11 - remove setting of SignalHeads