block & path signals used within a network?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
trainrover
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 29 Nov 2014 23:23

block & path signals used within a network?

Post by trainrover »

Hi. Is it possible to place block signals between junctions? I had read that using block signals wherever possible saves on CPU usage, and thus frees up more RAM(?). But my trains got lost, i.e., they would take wrong exits and a few might've stalled on their tracks. It's already been a few years since the couple of times that I'd tried blending the two signal types, I don't remember why I hadn't bothered sharing my question timely.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 495
Joined: 11 Aug 2019 18:15
Contact:

Re: block & path signals used within a network?

Post by 2TallTyler »

Block signals between junctions does not lead to lost trains. Sounds like you have another problem with trains not being able to reach their destinations.

The whole “path signals are more CPU intensive” is not true. As explained to me by the developer who wrote the pathfinder code: every time a vehicle comes to a junction the pathfinder must be run to determine the train’s route. With block and pre-signals, the train determines its own route. With path signals, the signal decides. Either way the pathfinder is called.

If there are no junctions before the next signal, the path signal just checks if the track is clear, working the same way as a block signal with no extra processing.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: block & path signals used within a network?

Post by Eddi »

trainrover wrote: 23 Mar 2021 12:28I had read that using block signals wherever possible saves on CPU usage, and thus frees up more RAM(?).
no, that is complete bulls***.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: block & path signals used within a network?

Post by Transportman »

Without a screenshot of your situation (or even better, a savegame), it is difficult to say why your trains get lost, but in almost all cases it has to do with your setup although that might not always be clear. There are settings that modify pathfinder behaviours in big ways, there might be a piece of unelectrified track on the route while running electrified trains, there might not be a path to the actual destination, so without a screenshot of your situation it is impossible to say what is happening.

Regarding mixing signals: There is no performance impact to use one signal over the other or mixing them, but there is a risk if a junction has both block and path signal entries, which might result in trains crashing into each other. Block signals will just show green if there is no train in the block but not reserve a path if a train passes, while a path signal will go green if a path can be reserved to the next signal. As the block signal does not reserve a path, the path signal thinks the path will be free while it actually is a collision course with a train that entered earlier through a block signal. As a rule, always use the same signal type on all entries of that junction.

Most often, you will be fine with path signals on a junction as they allow multiple trains to enter the junction at the same time as long as their paths to the next signal do not intersect. For straight tracks it is just personal preference, although I have the idea that block signals allow slightly higher throughputs because they go green as soon as a train clears the next signal while path signals also seem to reserve the tile with the next signal resulting in a slightly longer signal block. For multi-platform straight through stations, you might need to look at presignal setups to force trains to go to empty platforms, as path signals just look at the lowest penalty, which might be a partly occupied platform, while with presignals you can force the train to go to an empty platform or wait at the entry for a free one.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
trainrover
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 29 Nov 2014 23:23

Re: block & path signals used within a network?

Post by trainrover »

Thank you, you two. My block segment trials bore no junction therealong. However, I'd better try tinkering with pre-signals at universally assigning block signals to some station or junction, because this would be new for me too. I hope to return with a screenshot here either sometime soon or later this Spring (or must I therefore be wishing I fail....)
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 7 guests