Permits user-provided additional conditions for forcing a signal to red
2.6 alpha 0 r1646 or later
Configuration file: psignals on|off
Command line: -ZU
This features overrides the normal presignal system, allowing the user to specify that a signal should be red under various conditions.
Unlike routing restrictions
, this feature does nominally block a train from passing, and cannot test any properties of the approaching train. However, with PathBasedSignalling
, a train will pass a red signal if it can find a path, so in PBS blocks, the invalid exits must be restricted. On the other hand, entrances to a PBS block can safely be programmed to always red.
If you attempt to program an entrance or combo signal, it will be demoted to a normal or exit signal, respectively, until the programming is removed.
The criteria of programmed signals are viewed and set by clicking the 'Routefinding' button at the bottom of the signal gui window
. The same window serves for both routing restrictions and signal programming. When both switches are enabled, the window will default to Routing Restrictions. To switch to signal programming, click the button on the far right, which says 'Signal'. To switch back, click that button again, which now says 'Routefinding'.
The available variables which can be tested are:
- Number of (green/red) exit & combo signals
- Number of (one-way/two-way) (green/red) exit & combo signals
- Entered side of tile
- Signal status: SW, SE, NW or NE
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 signal, the mouse icon will change, indicating that you may click on the appropriate tile.
A signal will show red if the test(s) set are satisfied.
The share and copy buttons are used to share or copy respectively criteria sets with existing programmed 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 programming of a signal, without affecting any shared signals, as if the signal had been deleted and reconstructed.
Programmed signals can be distinguished from non-programmed signals using the landinfo window: the text will include the word 'programmed'.
Number of ... exit and combo signals
This returns the number of exit and combo signals that match the specified condition and would affect an entrance or combo signal in the same location as the programmed signal.
The "Number of (green/red) exit & combo signals" tests will count both one-way and two-way signals. The other four will count only one-way signals or only two-way signals, depending on which is selected. The simplest programmed equivalent to the conventional entrance or combo signal is "Number of green exit & combo signals is 0".
Boolean operators work exactly as for routing restrictions
Due to technical limitations, the signal referenced by a signal status condition should be a exit or combo signal that would affect a presignal in the same location as the programmed signal. Other than that, signal status works exactly as for routing restrictions
This feature was contributed by Jonathan G. Rennison.
Suppose you'd like your trains using a certain track in a station, if available. This could, e.g., be a nice solution to keep trains automatically on a certain track when departing again, i.e. without having to change lane. Something like this can be easily achieved by using programmable signals.
Track 1 (above) is guarded by a "programmable signal" which has been programmed to show "red" if the signal guarding track 2 (below) shows "green". O/c, it'd also show "red" if track 1 is in use. In any case, the train now reserves a path for track 2:
As soon as track 2 is in use and its guarding signal switched to "red", the signal guarding
track 1 is automatically set to "green".
Now, a second train could pull in into this track:
As soon as track 2 will be available again, the programmable signal guarding track 1 changes to "red" again: