My goal: I want to build a 3-track railroad. with 2 conditions:
1. 2 outer tracks are the main tracks, each works in its own direction(opposite).
2. The middle tack is a shared one and works in both directions. It should be used only if the main track is busy with a broken or slower train. And trains should get back to the main track as soon as it is possible.
The problem: If I use no signals on the middle track, it will be always used by trains even if their main track is free. From egoistic approach it makes sense to use the middle track if it is free. But I want to let trains only use it to pass other trains on the main track.
I think I need to add some penalty to the middle track, so it will be less preferable to the pathfinding algo. I tried to place PBS so that trains have to approach them from behind and as I understand this method does create some penalty. BUT PBS also create some strange conditions, so trains get stuck when there is clearly a free path.
I created a minimal example to demonstrate that.
Here you can see the main track on top is busy with a stopped train. Another track under it is free and could be used by the second train. But the second train is waiting for free path.
The problem is in the block, pointed by two railroad arrows. Somehow pathfinding algo gets lost in this place even though it can choose any of two ways:
- either through PBS pointed by the lower arrow
- or a free path pointed by the top arrow
I assume, PF gets into a loop or smth in that place, because if I remove either a PBS or a piece of railroad pointed by the arrows, then PF immediately resolves the way.
Anyways, even though I'd like to resolve the general PBS problem in the simplified example, my main issue is how to build a three-track railroad. Maybe I need to use something else, not inverted PBS. Please advice.
Path signal doesn't allow a train to a free path
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 6
- Joined: 05 Feb 2023 04:58
Re: Path signal doesn't allow a train to a free path
You should have stopping points (signals) on the passing track too, but in both directions.
-
- Engineer
- Posts: 6
- Joined: 05 Feb 2023 04:58
Re: Path signal doesn't allow a train to a free path
Thanks for your idea. I was also experimenting with block signals. It made it somewhat better, now train doesn't reserve the entire middle lane. But they still prefer middle over outer tracks. So the block signals do not solve the priority issue.
Re: Path signal doesn't allow a train to a free path
AFAIK the train pathfinder doesn't look whether the path is free beyond the first encountered signal. It assumes that all trains are moving, and the sections that are occupied now will be free once the train reaches them. The pathfinder does not make any attempts to overtake a slow-moving train, although I've heard this feature exists in the JGR's patch pack.
Also, the pathfinder tries to select the path that contain the fewest penalties (i.e. sharp turns, backwards signals, or road crossings). This is why your trains consistently prefer the middle track. However, you can take advantage of this behaviour by placing artificial penalties on your middle track.
Also, the pathfinder tries to select the path that contain the fewest penalties (i.e. sharp turns, backwards signals, or road crossings). This is why your trains consistently prefer the middle track. However, you can take advantage of this behaviour by placing artificial penalties on your middle track.
Re: Path signal doesn't allow a train to a free path
If the approach tracks are aligned with the outside tracks, the pathfinder will prefer to put trains down the outside tracks if everything else is equal.
Re: Path signal doesn't allow a train to a free path
a 3rd track will probably never work "right", as the pathfinder can not know when a train is "slow" or "broken down".
however, the least thing you need to do is:
however, the least thing you need to do is:
- put path signals in the middle, not block signals
- carefully blance the penalty for passing a reverse path signal with your train length (= number of occupied track penalties). however that may break other parts of your network
- possibly reduce the lookahead distance (typically 10 signals)
Who is online
Users browsing this forum: No registered users and 10 guests