Token Management 2

<kuid2:160293:101022:3>

Author: trev999
Kind: drivercommand
Build: 2.9
Size: 35.33KB
Uploaded: 2023-10-07
Loadings:
0
-
0
+

Token Management 2

Version 2.3 2015-05-14
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
Switch on/off token messaging in message console

NEW 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. There is no setting up required for this rule.

A token is defined by starting the name of a trackmark with a # (hash) character. Use this command to request permission for a train to use a section of track. Only one train driver may own a particular token at any one time and other drivers requesting the same token will wait until it is their turn before proceeding.

A train driver not requesting a token for a controlled section is in contravention of the rules of the train company.

If the option 'Request and hold Token' is used then the requesting driver must issue a command 'Clear my token' to release 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 free to be taken.

If the option to 'make clustered bid' is used, this forms one in a set of bids for tokens that must be simultaneously held before the schedule can proceed. If there are three tokens in the set then the first two bids should use 'make clustered bid', and the terminating third bid must use 'make final bid'. No bids are actually made until the final bid is issued but all bids are added to the list of tokens required.

If the option 'request and wait until unoccupied' is selected then the requesting train will wait until the track containing the token trackmark is not occupied before proceeding, even though it owns the token. The token will be automatically released 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 requesting train waits until any other train releases the token before proceeding. 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 issuing 'Clear other token' and specifying the token name.

For protecting diamond crossings, use two trackmarks with the same base name and extensions in parentheses (). Place one trackmark on 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.

Requesting in advance: An express train may reserve a token well before reaching a controlled section, so as to keep the main line clear. 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 need not be placed on the track which the train will use; it could be on an isolated track. If so, the token will not be automatically released when the train passes the controlled section and must be explicitly cleared by using the 'C

Author: trev999

    Token Management 2
  • config.txt 8.72KB
  • tm2.tga 64.02KB
  • tokenmanagement.jpg 14.35KB
  • tokenmanagementcommand.gs 15.00KB
  • tokenmanagementschedulecommand.gs 25.12KB

User photos

No one has added a photo of this object yet