Difference between revisions of "RoutingRestrictions:Alpha"
m (7 revisions) |
(No difference)
|
Revision as of 19:10, 12 June 2011
Enables train routetracing to be restricted according to user criteria
Routing Restrictions
Enables train routetracing to be restricted according to user criteria
2.6 alpha 0 r1078 or later
-=Switch=-
Configuration file: tracerestrict on|off
Command line: -ZZ
-=Description=-
This features allows the route finding algorithm of trains to be conditionally allowed or denied to search past a restricted signal based upon criteria set by the user.
This feature does not actually block a train from passing, but merely convinces the train's route finding algorithm that the path is a dead end, if a train does not meet the required criteria.
In essence a restricted signal discourages trains which do not meet the criteria from passing.
The criteria of restricted signals are viewed and set by clicking the 'Routefinding' button at the bottom of the signal gui window ExperimentalFeatures:Alpha.
The available variables which can be tested are:
- Number of train carriages (this includes the locomotive)
- Maximum train speed in mph/kph
- Station of current order
- Station of next order
- Last visited station
- Depot of current order
- Depot of next order
- Total train horsepower
- Total train weight (in tonnes)
- Train cargo (can the train carry/not carry the selected cargo)
- Number of tiles from signal
- Signal status: SW, SE, NW or NE
- Train is/is not searching for a depot
- Entered side of tile
- Tile from which the PBS block was entered
The variable is selected from the drop down box opened by pressing the first button, labeled: 'Variable'.
The comparative operator is then selected from the second button, labeled: 'Op', the default operator for all variables except signal status is 'is'.
The value to which the variable is compared is set by pressing the third button, labeled: 'Value'. If the variable is comparing a depot, station or signal, the mouse icon will change, indicating that you may click on the appropriate tile.
A train will pass the signal if it satisfies the comparison test(s) set.
The share and copy buttons are used to share or copy respectively criteria sets with existing restricted signals by clicking on the button and then the signal to copy/share with.
The criteria set is deleted when the last signal which references it is deleted/reset.
The reset button clears the restriction criteria of a signal, without affecting any shared signals, as if the signal had been deleted and reconstructed.
Restricted signals can be distinguished from non-restricted signals using the landinfo window: the text will include the word: 'Restricted'.
Boolean Operators
More than one criteria may be used by the use of one of the boolean operators and, or, or xor.
Or is defined as: one or the other, or both.
Xor is defined as: one or the other, but not both.
This is done by clicking on the and, or or xor buttons.
A boolean operator appears directly before and one indent level to the left of the two criteria it operates on.
Boolean operators can be recursed.
Boolean operators can be removed only if at least one of its criteria is not set, and, upon removal, will be replaced by the one which is set, or a blank criteria if neither is set.
A criteria or boolean operator can be selected by clicking it or the line it is on. It can be then deleted using the delete button, or modified. A blank restriction criteria is indicated by a dash. Any blank or incomplete restriction criteria returns true/allows a train to pass.
Signal Status
The signal status criteria test whether one of the up to four signals on a tile is red or green. There are four track directions on which signals can be placed. Which signal status criteria is used indicates which signal to test, as shown below:
/
SW&NW;=Signal in SW direction
SE≠=Signal in NE direction
\
SW&NW;=Signal in NW direction
SE≠=Signal in SE direction
||
NW=West side facing North
NE=East side facing North
SW=West side facing South
SE=East side facing South
=
NW=North side facing West
NE=North side facing East
SW=South side facing West
SE=South side facing East
Non-existent signals are classified as red.
PBS block entered from
When not in a PBS block, the condition "Entered tile of the PBS block is..." will always return false/prevent a train from passing; the condition "Entered tile of the PBS block is not..." will always return true/permit a train to pass.
Current technical limitations:
There is a limit on the number of signal restrictions that can be placed on the map. Max 16,384 objects total, including all sub objects, copied objects, binary operators, etc.
Maximum of 256 restricted signals per sixteenth sector of map. 64x64 area.
Shared restrictions only count once for each criteria/binary operator on the first limit.
These limits may be increased in the future if the need arises.
Examples
See the Signalling Guide|nocache for examples how to use routing restrictions (and other signalling stuff).
This feature was contributed by Jonathan G. Rennison.