Page 1 of 1

Train path finding to station

Posted: 09 Jan 2024 14:39
by Big Broter
Hello,
I built a long station for trains of the length 2. I use path signals everywhere but the trains can't find the 4th and 5th set of stations. They are all one station, so that's not the problem. The direction is from bottom to top on the picture. Blue is station, green tunnels and the down rail. Red is normal rail.
As said, the trains don't reach further than the 3rd set of stations. Is there something to change with the AI? Less signal or is it just not possible?Image

Re: Train path finding to station

Posted: 10 Jan 2024 01:20
by kamnet
A copy of your save game would be more helpful when trying to diagnose these issues.

Re: Train path finding to station

Posted: 10 Jan 2024 02:51
by Eddi
try to increase this (hidden) setting on the console:

Code: Select all

yapf.rail_pbs_station_penalty
default value is 800 (try doubling that)

it means "try 8 tiles of detour around an occupied platform [tile]". as your station is very long, but your platforms are very short, the accumulated distance penalty for the last platforms might exceed that, so the trains decide it's rather worth waiting for the occupied platform to free up.

warning that messing with pathfinder penalties may result in weird behaviour in other areas of the map, which may be spotted only much later

Re: Train path finding to station

Posted: 11 Jan 2024 08:09
by odisseus
This problem can be solved without tweaking the pathfinder. However, you'll have to use pre-signals and perhaps change the station layout a little bit.

You need to place a two-way exit signal at the entrance of each individual platform, and a one-way block signal at the entrance of each platform block. With the two-way end of line setting (which is enabled by default since version 13.0), this will cause the train to skip the taken platform and head on to the next platform or block.

If there are no free platforms at all, the train will pass through the entire station and emerge at the top end without ever stopping. However, with 25 platforms this situation is rather unlikely. You can also add a loop back to the station entrance to give such trains a second chance.
Dronnbridge Transport, 1961-01-23-fs8.png
Dronnbridge Transport, 1961-01-23-fs8.png (19.17 KiB) Viewed 1678 times

Re: Train path finding to station

Posted: 25 Jan 2024 10:44
by Big Broter
Eddi wrote: 10 Jan 2024 02:51 try to increase this (hidden) setting on the console:

Code: Select all

yapf.rail_pbs_station_penalty
default value is 800 (try doubling that)

it means "try 8 tiles of detour around an occupied platform [tile]". as your station is very long, but your platforms are very short, the accumulated distance penalty for the last platforms might exceed that, so the trains decide it's rather worth waiting for the occupied platform to free up.

warning that messing with pathfinder penalties may result in weird behaviour in other areas of the map, which may be spotted only much later
Thank you very much. Hopefully it won't cause problems