Package jmri

Class Transit

All Implemented Interfaces:
Comparable<NamedBean>, PropertyChangeProvider, NamedBean

public class Transit
extends AbstractNamedBean
A Transit is a group of Sections representing a specified path through a layout.

A Transit may have the following states:

IDLE
available for assignment to a train
ASSIGNED
linked to a train in an ActiveTrain

When assigned to a Transit, options may be set for the assigned Section. The Section and its options are kept in a TransitSection object.

To accommodate passing sidings and other track features, there may be multiple Sections connecting two other Sections in a Transit. If so, one Section is assigned as primary, and the other connecting Sections are assigned as alternates.

A Section may be in a Transit more than once, for example if a train is to make two or more loops around a layout before going elsewhere.

A Transit is normally traversed in the forward direction, that is, the direction of increasing Section Numbers. When a Transit traversal is started up, it is always started in the forward direction. However, to accommodate point-to-point (back and forth) route designs, the direction of travel in a Transit may be "reversed". While the Transit direction is "reversed", the direction of travel is the direction of decreasing Section numbers. Whether a Transit is in the "reversed" direction is kept in the ActiveTrain using the Transit.