Time Facing Red
The Time Facing Red plugin contains a snippet to calculate the Time Facing Red of deterministic simulations executed by the script.
Time Facing Red
The Time Facing Red is the amount of time that each train spends in a signaling block where the relevant exit signal shows a red aspect as a result of an inability to set the route ahead.
In Trenissimo it is estimated as the time between the moment in which a train enters a block section that shows a yellow aspect and the moment the following signal is switched to a less restrictive aspect.
Quick start
- Install or enable the Time Facing Red plugin.
- Include the
lib/TimeFacingRedsnipped in the script. - Execute the simulation.
How it works
Deterministic simulation
In a matrix simulation, include the Time Facing Red:
runSimulations {
withMicro('Micro')
withRollingStock('RollingStock')
// ...
snippet('lib/TimeFacingRed')
}
If the script calls a snippet, the Time Facing Red itself can be included in the script's default slot .
snippet('...') {
snippet('lib/TimeFacingRed')
}
Output format
The output is in CSV format with the following columns:
- simulationScenario: the scenario name; otherwise, the argument
outputParamsallows you to specify other columns compiled with the scenario parameters, instead of the scenario name. - runKey: for the stochastic simulations, it is the identifier of the run; otherwise, the column is empty.
- route: the name of the route on which the train encountered a conflict.
- train: the number of the train that encountered the conflict.
- description: the conflict description.
- startingSignal: the name of the route entry signal.
- start: the initial time a train starts seeing a conflict.
- end: the final time a train sees a conflict.
- tfr: the time spent between start and end.
Script arguments
- outputParams: allows you to specify additional columns compiled with the scenario's parameters, instead of using
simulationScenario. - fileName: name of the output file. The default one is
timeFacingRed.csv.