User Tools

Site Tools


Real Time Simulation

ContentAutomatic Mode

This is an exclusive goody to supporters of the project, who have a valid Support Key installed.

Realistic train processing in virtual simulation

It may be helpful to drive trains with their real speed in virtual simulation for testing.

Examples of use

  • test of schedules
  • test of travel times, eg to discover bottlenecks
  • check of wait times in blocks
  • signaling test
  • planning of blocks to increase the throughput on a route between stations
  • detecting bottlenecks in a set of points
  • … and much more

Basic settings in Rocrail for Realtime Simulation

  • Option Calculate is set in Rocrail Properties Automatic
  • Scale and metric units are defined
  • block length is defined (total length and/or optional distance between ENTER and IN of the target block)
  • route length is defined (distance between IN of starting block and ENTER of target block)
  • max. km/h value is defined in route-speed-definition
  • loco speed mode is defined (at least with km/h values)
Setup Example Example Image
Rocrail Properties / Automatic / Routing / Calculate Calculate = ON
Plan Properties / Scale


Plan Properties / Metric units
Scale = 87

Metric units = mm
Block / General / Length
a) Logical Length
b) (optional) Physical Length
see Block Length Usage
Block Length = 2002
Route / Permissions / Length Route Length = 1002
Route / Speed / Max. km/h Max. km/h = 80
Locomotive / Speed / Mode Locomotive Speed = Percent

(in any case "km/h" has to be filled with values other then zero)

Mode of operation

  • locomotives have to be started with "virtual automatic" from the context menu;
  • for schedule testing the locomotive options "Look up a schedule if idle" and "Virtual automatic" have to be set in the locomotive details tab.

Rocrail uses the values of speed, scale and lengths to calculate the traveling time of the locomotive and generates an internal virtual enter2in event with this timing.

If the locomotive has to wait in a block, the timing will be calculated with half of the locomotive speed value for simulating the deceleration of the locomotive.

Hint: When transferring the virtual results to a real layout, best results will be given with calibrated locomotives.
Setup Example Example Image
Loc Menu / Virtual automatic Start Locomotive Virtual
Loc Properties / Details / … Options for schedules

Block Length Usage

To specify the length of a block with Rocrail version 15721+ two fields are available:

  • the first field is called "Logical Length";
  • the second field is called "Physical Length".

The "Logical Length" is mainly used for permission calculations. Each locomotive and/or train must fit into this "Logical Length".
The "Physical Length" holds the distance between the ENTER sensor and the IN sensor of the block. This "Physical Length" is useful if the train is allowed be longer than the distance between the installed sensors.
The following table shows

  • which field is used to calculate the permission for a locomotive to enter the block and
  • which fields are used to calculate the RealTime Simulation values.
Logical Length Physical Length Permission RealTime Simulation
0 0 yes no RealTime Simulation
0 PLength yes PLength will be used for RealTime Simulation
LLength 0 (loco+gap) < LLength LLength will be used for RealTime Simulation
LLength PLength (loco+gap) < LLength PLength will be used for RealTime Simulation

"(loco+gap)": the length of the locomotive plus the value taken from "Rocrail Properties / Automatic / Block / Min. block - train length"

Within XML scripting these attributes may be used:

  • "Logical Length": object "bk", attribute "len"
  • "Physical Length": object "bk", attribute "lenenter2in"

RealTime Simulation Plan

For testing this workspace is provided:

The calculated result can be found in the Rocrail trace files. Call Menu → Help → Trace… for reading the trace files and filter the RealTime Simulation values with Text: "virtual" and Typ: "OLoc".
"virtualeventtimer" and "virtualtimer" will show the used parameters and the calculated result.

The trace filter is described here: tracefilter

realtime-simulation-en.txt · Last modified: 2023/08/29 11:09 by rjversluis