ProgrammableSignals:Alpha

From TTWiki
Jump to navigationJump to search

Permits user-provided additional conditions for forcing a signal to red.

2.6 alpha 0 r1646 or later

Switch

Configuration file: psignals on|off

Command line: -ZU

Description

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 ExperimentalFeatures:Alpha. 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

Boolean operators work exactly as for routing restrictions.

Signal Status

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.