Conditional exit from mainline

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

Moderator: OpenTTD Developers

Post Reply
verzasoft
Engineer
Engineer
Posts: 3
Joined: 05 Jan 2021 14:17

Conditional exit from mainline

Post by verzasoft »

Hi everybody,

I am stuck with a problem I cannot find an elegant solution to.
I have a 4-track mainline, and along this there are a lot of "exits" that bring to primary industries. Those industries have a station with 1 terminal track. Trains travel along the mainline, in both directions, and must exit only when they pass near an empty loading station. So I put a list of conditional orders like this:

1: Go non-stop to waypoint CS2
2: Jump to order 5 if next station has 0 free platforms
3: Go non-stop to station FRUIT1 and wait full load
4: Jump to order 99
5: Go non-stop to waypoint CS4
6: Jump to order 9 if next station has 0 free platforms
7: Go non-stop to station FRUIT2 and wait full load
8: Jump to order 99
9: Go non-stop to waypoint CS6
... (repeat...)
99: Go to station FOOD FACTORY and unload

So I first tried this setup:
Image
But this does not work: when the train arrives from south to the signal before waypoint CS2, it reserves all the path to the station included, so at the evaluation at the waypoint the station is already occupied and Jumps to next waypoint.
(Block signals are mandatory because if the station does not get reserved from the waypoint there is a 100% chance that when a train arrives at CS2 and another at CS1 from north the both try to go to the station).

So I then put a setup like this:
Image
Adding a signal on the station inlet prevents full reservation, but if a train breaks down between the CS2 waypoint and the inlet signal, the station is not yet reserved, so another train that coming from north passes through waypoint CS1 going south, decides to exit and jam.

The third - and best attempt - was to move the inlet signal from the station lane to just after the waypoint, so that a breakdown between waypoint and reservation signal is not possible:
Image
However, this is still not perfect in some cases: since signal is after the waypoint, it may happen that first lane (the one nearest to the exit station) is occupied by a train simply passing from south to north, and for this reason trains on the other lanes arrive at their waypoint and wait at the signal; after first lane is free, they all try to go to the station, jamming.

Do you have some suggestions on how achieve a working setup?

Yes, I can build a bunch of bridges like this:
Image
But is very difficult to build, a lot wide, expensive and it is simply a mess.
Attachments
tipo1.PNG
(426.63 KiB) Not downloaded yet
tipo2.PNG
(427.32 KiB) Not downloaded yet
tipo3.PNG
(428.71 KiB) Not downloaded yet
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 30 guests