Skip to main content

Async Simulation

The Async Simulation plugin contains a snippet and a script template to simulate all the trains of a timetable independently.

Quick start

  1. Install or enable the Async Simulation plugin.
  2. Right-click the icon of a Scripted Simulation project, New, Other..., Async Simulation script.
  3. Customize the script.
    • rollingStock, timetable and micro: the projects to be used for the simulation.
    • In the default slot, you can configure other characteristics of the script. advanced
  4. Execute the script.

How it works

This is the template of the script:

snippet('lib/AsyncSimulation',
// snippet configuration
rollingStock: 'RollingStock',
timetable:'Timetable',
micro: 'Micro'
) {
// default slot
}

All the logic is contained in the lib/AsyncSimulation.snippet snippet, the body of the script contains only the configuration. The lib/AsyncSimulation.snippet does not create outputs, as they are suppressed. It is necessary to modify the script in order to generate outputs from the asynchronous simulation. See examples below.

Tutorials

Examples

Minimum time, without stops

snippet('lib/AsyncSimulation',
// snippet configuration
rollingStock: 'RollingStock',
timetable:'Timetable',
micro: 'Micro'
) {
// default slot
withTimetableTransformations {
timetableTransformations { setEntryType(pass).withEntryMatcher('not origin and not destination')}
}
}

Calculation of minimum TSAR

snippet('lib/AsyncSimulation',
// snippet configuration
rollingStock: 'RollingStock',
timetable:'Timetable',
micro: 'Micro'
) {
// default slot
withTimetableTransformations {
timetableTransformations { setEntryType(pass).withEntryMatcher('not origin and not destination')}
}
snippet('lib/TimeSignalAtRed')
}

In depth guide