Case study / 03
Moving Block Train Control
Cross-platform control and simulation
A C++ train-control component for modelling moving-block separation, routes, switching, and network-aware speed authority.
An abstract railway schematic shows a following train behind a lead train, plus a switch to an unavailable branch. Observed topology, train position, route and switch state, restrictions and reservations enter a C++ control core. It evaluates routes, following separation, conflict resources, movement authority and speed. Planimate applies returned commands, advances the simulation and supplies the next observed state through the native interface.
01 / Control problem
Authority changes as trains and topology change
Moving-block control cannot treat the railway as a fixed sequence of occupied blocks. Authority depends on train front and rear position, the route ahead, following trains, switches, shared track, active restrictions and reservations.
Those inputs change continuously. A route event, closure or new train observation can shorten an earlier authority and invalidate its speed plan, so control decisions have to be recalculated against current state.
02 / Control architecture
Observed state in; current commands out
Planimate owns simulation time, events and train movement. At each control step it passes the observed railway state across a native interface. The C++ controller evaluates route access, following separation and conflict reservations, then returns movement authority and speed commands.
The authority is a position limit along the selected route, not simply permission to reach the next node. Commands carry revisions so the simulation host can discard a superseded speed profile after the controller state changes.
- Train length and rear clearance affect occupancy and release
- Junctions and shared track are handled as reservable resources
- Closures and speed restrictions feed the same authority calculation
03 / Integration
Detailed control behaviour inside an operational model
Keeping the control core outside the simulation model makes the logic testable against explicit network and train-state fixtures. The same source builds as a Windows DLL and Linux shared library, with a narrow adapter handling the Planimate table interface.
The component supports topology-aware following, route and switch decisions, speed profiles and conflict handling within larger rail simulations.