Friday, September 26, 2014

Automated Train Control arrives on the Welztalbahn

The automated "demonstration mode" in operation on the Welztalbahn. Trains are controlled through a JMRI jython script. Each engine is managed by it's own thread in the script and observes signal indication along the route. An additional thread lines turnouts and sets signals to Green (Hp1 or Hp2 as appropriate) when the section to the next signal is clear, and a train is approaching. Signals reset to Red (Hp0) when the train enters the protected section. If no train is approaching, signals show Red (Hp0).
I.e. the engine threads behave like a human engineer, and the signal thread behaves like a human dispatcher would.

As a train approaches a red signal, it slows down to restricted speed and coasts to a stop just before the signal. This is implemented by setting restricted speed ono detection block before the signal, and using a timer upon entering the detection section before the signal. The duration of the timer is relative to the length of the detection section, and set so that the longest train is entirely in the track as much as possible. This will be important for automated meets in Emsingen and Talheim in the future.

The script also supports automated station stops for passenger trains, so they might stop at the station even though the signal is already green, which is entirely prototypical behavior. The same

At the moment 3 trains are chasing each other on the same route. With some additional logic I should be able to run an opposing train on a different route that shares track with the first route.

As is the script is useful to generate some action on the layout during an Open House without me having to pay much attention that trains don't run into each other.

No comments: