Version 2.3C 2020-07-12 This command contains the following options:
Request and hold a token (with various further options)
Request a token and wait until trackmark is unoccupied
Request token but don't wait until track is unoccupied
Reserve a token in advance
Clear a Token owned by this train
Clear a token owned by another train
Display which drivers own or are requesting a given token
Display which driver holds a token
Display which tokens a train is waiting for
Select the level of diagnostic messaging (0 = none)
REQUIREMENT: A rule called Token Management Rule needs to be added to the session so that when saved games are restored, the rule can restart threads that were opened to wait for trains to leave their token trackmarks. No setup is required for this rule.
DEFINING A TOKEN: A token is created by naming a trackmark with a # (hash) as the first character. Example: #My Token. The trackmark may be situated in the path of a train or on an isolated piece of track.
OPERATION: When a request for a token is issued a check for other owners is made and the schedule will not be allowed to proceed until exclusive ownership of the token is granted to this train.
If a train driver enters a controlled section without requesting the relevant token then this rule cannot protect it from conflicting with other trains.
If the option 'Request and hold Token' is used then the requesting driver must issue a command 'Clear my token' to surrender the token when finished with it so that another driver may gain access to the controlled section.
IMMEDIATE AND CLUSTERED BIDS FOR A TOKEN: A train driver may request (bid for) a single token or a cluster of tokens. Immediate bids are acted on immediately, while bids for a cluster are only granted when all the tokens comprising the cluster are not owned by other trains.
If the option to 'make a clustered bid' is used, this forms one in a set of bids for tokens that must be simultaneously owned before the schedule can proceed. If there are three tokens in the set then the first two bids should use 'make a clustered bid', and the terminating third bid should use 'make a final bid'. No tokens are actually awarded until the final bid is successful but all bids are added to the list of requested tokens.
If the option 'request and wait until unoccupied' is selected then the requesting train will wait until any occupying train vacates the track containing the token trackmark before proceeding, even though the requesting train now owns the token. The token will be automatically surrendered when the requesting train leaves the track where the token trackmark is lodged. Clustered bids are also permitted as above and bids need not all be of the same type.
If the option 'request token, ignore occupancy' is used then the schedule of the requesting train will proceed once any other train holding that token relinquishes it. This option is needed if the requesting train is already on the track where the token trackmark is situated, or where trains must share the same controlled section.
If a train driver holding a token is unable to release the token (e.g. has derailed or entered a portal) then the uncleared token may be cleared by another train issuing 'Clear other token' and specifying the token name.
For protecting diamond crossings, use two trackmarks with the same base name and different extensions in parentheses: base-name(ext). Place one trackmark near each leg of the crossing. A train leaving either trackmark in either direction will release the token. Always use the same instance of the trackmark when selecting the token trackmark in the driver schedule.
When more than one train contends for a token then the train with a lower priority number has a better chance of receiving it first.
REQUESTING IN ADVANCE: An express train may reserve a token well before reaching a controlled section, so as to keep the main line clear of traffic. Tokens reserved in advance must be cleared explicitly by the requesting train, or by issuing a new request of type 'Request and wait' if the token trackmark is on the main line.
NOTE: A token trackmark might not be located on the track which the requesting train will use. If so, the token will not be automatically released when the train passes the controlled section and must be explicitly cleared by using the 'Clear my token' option. In this way authority to proceed is not limited to a particular track.
Special case for use with Shedmaster: Trackmarks starting with the letters MPD or MPP automatically qualify as tokens.