Lost trains & Signals


Written by Martin Koetsier.


This is the november 1998 version of the page on Lost trains & Signals. The ideas on this particular item are in need of re-evaluation due to the Pathfinding algorithm theory.

The problems we're facing
Once your railnetwork gets more complicated you'll find some of your trains will get lost occasionally. No telling how or why, it is just one of those things. Or as Wolfgang Preiss puts it:
"... three things can confuse the pathfinding algorithm of trains in TTD: - tunnels,
'forced maintenance'-depots of the simple sort
(where trains must enter - cannot drive by)
and choice between one-way signals".

This is not 100% adequate though. If there is a railnetwork between two stations, far away from each other, and you would happen to build a branch somewhere in between you might find that trains will use the newly build branch eventhough this branch doesn't extend itself to the right destination. In fact, the branch might not have access to any station. This happens without a single tunnel or forced-maintenance-depot on either the suddenly preferred route or the abandoned route.

(Choice between) Signals
Of course we all know about the difference between one-way and two-directional signals. This is one of the major improvements in the Deluxe-version of the game. A train plots it's favourite route to the next destination. This will often be the shortest route. If this train finds a red signal on it's way it will wait for that signal to turn green if it is a one-way signal. If the signal is two-directional the train will alter course if a switch is available. Whether or not this will lead the train to it's destination is not taken into account. Poor signalling can lead trains astray!

Some examples

The train from the bottom left hits a red signal. Since this is a one-way signal the train will stick to it's designated/favourite route and will wait for the signal to clear. If this takes too long the train might reverse and run into the signal again. It will ignore signal B as long as signal A is one-way only.


Here the train is on it's way to signal A again. But since it is red and two-directional the train is allowed to deviate from it's designated route. The train will keep trying to reach to the destination it was ordered so if it cannot find a direct line from it's new course it becomes a lost train.

Conclusions
Trains can get lost; we have all seen it happen. Reasons can be forced maintenance or signal layouts and perhaps using tunnels as well. So if you looked into that and trains still get lost the other option is a faulty pathfinding algorithm. The only remedy left then is building a new extension to your rail network for trains to find their destinations!

.

For more about signals, and why trains go wrong, see Signal problems - pretend it's a horse!

last updated: 2003-0105, (2002-0303, 2000-0508 CI)