Maintenance Gaps
The plugin Maintenance Gaps calculate the maintenance gaps along a line.
A maintenance gap is a time interval during which all routes in an ILB are available (i.e. not occupied, reserved nor in conflict).
Quick start
- Install or enable the Maintenance Gaps plugin.
- In a Scripted Simulation projects, right click on the project node, then New, Other, Maintenance Gaps script. Accept the default options. A new
MaintenanceGapsscript file is created, with the following content:snippet('lib/AsyncSimulation',
// snippet configuration
rollingStock: 'RollingStock',
timetable:'Timetable',
micro: 'Micro'
) {
snippet('lib/MultiDayTimeSignalAtRed')
snippet('lib/MaintenanceGaps')
} - Right click on the newly created script file, then click Set as main script.
- Customize the script:
rollingStock,timetableandmicro: the projects to be used for the simulation.
- Right click on the project node, then New, Other, Maintenance Gaps data file. Accept the default options. A new
ILBdata file is created, with the following content:ILB,Route1,Route2,Route3,,,,,,RouteN - Fill the data file, with an ILB for each line, followed by the list of routes in that ILB, comma separated. The same route can be part of multiple ILB. Here an example:
ILB,Route1,Route2,Route3,,,,,,RouteN
EAS-1-4,EH132-EH332
EAS-1-6,E28-E38,E38-E346,E26-E36,E36-E40
EAS-1-7,E337-E85,E85-E93,E93-E105,E339-E87,E87-E91,E91-E103
EAS-1-9,E87-E91,E38-E346
EAS-1-15,EH155-EH157,EH155-EH371 - Execute the simulation.
How it works
Trenissimo performs an asynchronous simulation, running each train independently, and recording route availability times. Then calculates the time interval during which all routes in an ILB are available, and writes the gaps in a CSV file.
Times are stored in second from the 00:00 of the first day of simulation.
Input and output file names cam be customized in the configuration of the MaintenanceGaps snippet. Here is an example:
snippet('lib/AsyncSimulation',
// snippet configuration
rollingStock: 'RollingStock',
timetable:'Timetable',
micro: 'Micro'
) {
snippet('lib/MultiDayTimeSignalAtRed', inputFile: 'ILB_WB.csv', outputFile: 'ILB_WB_Gaps.csv')
snippet('lib/MaintenanceGaps')
}