Balancing trains over several tracks along the same route?

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

Moderator: OpenTTD Developers

Post Reply
pickpacket
Engineer
Engineer
Posts: 53
Joined: 26 Sep 2022 09:10

Balancing trains over several tracks along the same route?

Post by pickpacket »

I don't usually go for the full one-track-super-highway-to-rule-them-all approach common to coop games, but I do usually end up with several tracks in each direction along a route. So far I've used roro stations with (usually) two inbound and two outbound tracks. Inbound trains take any available platform and when leaving the station they are split along two different tracks. This means I can add more trains to one of the tracks in any direction and when the trains have passed one or at most two stations they will be fairly evenly distributed over the two tracks.

However this often causes some congestion at station entrance. And moreover I'd like to explore terminus stations more in order to save some space on one side of the stations. But I can't wrap my head around how to efficiently split and merge tracks or how to distribute trains in a similar (or preferably more efficient) way.

Any tips?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Balancing trains over several tracks along the same route?

Post by Alberth »

At the supply side to the station yuo can do something like this. Feed 2 tracks with one entry point over a bridge.
Of course, with enough tracks or busy enough station, the tracks before the bridges may need to be expanded, multiple tracks providing new trains etc. The idea is that there is always a new train waiting at the bridge.
entry side
entry side
Screenshot from 2023-06-15 21-28-55.png (165.24 KiB) Viewed 2303 times
Now at the departure side you can do (for a very simple case) something like this. Note how leaving trans don't cross the tracks of the supply side. For a busy station, you may want to make the distance to the first signal longer, have multiple exit tracks to increase capacity etc.
departusre side
departusre side
Screenshot from 2023-06-15 21-32-12.png (151.32 KiB) Viewed 2303 times
Being a retired OpenTTD developer does not mean I know what I am doing.
pickpacket
Engineer
Engineer
Posts: 53
Joined: 26 Sep 2022 09:10

Re: Balancing trains over several tracks along the same route?

Post by pickpacket »

In my experience a station like that works very well for one incoming and one outgoing track, but when I add more incoming and outgoing tracks I get queues :(

Can you show how a solution with two incoming and two outgoing tracks would look like?
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: Balancing trains over several tracks along the same route?

Post by mak »

Something like this ??????
Attachments
Screenshot (3).png
(1.52 MiB) Not downloaded yet
pickpacket
Engineer
Engineer
Posts: 53
Joined: 26 Sep 2022 09:10

Re: Balancing trains over several tracks along the same route?

Post by pickpacket »

Yes! But try adding another ten platforms to that and you'll get congestions with that design.
pickpacket
Engineer
Engineer
Posts: 53
Joined: 26 Sep 2022 09:10

Re: Balancing trains over several tracks along the same route?

Post by pickpacket »

Screenshot at 2023-06-18 17-45-42.png
(686.64 KiB) Not downloaded yet
This design has a very high throughput at sorts the outgoing trains evenly over the two tracks (I never know when to use "track" and when to use "line"). It's a really efficient design, actually, but it's also very very *big*. I'm hoping someone here has better designs to share.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Balancing trains over several tracks along the same route?

Post by Alberth »

pickpacket wrote: 18 Jun 2023 10:12 In my experience a station like that works very well for one incoming and one outgoing track, but when I add more incoming and outgoing tracks I get queues :(

Can you show how a solution with two incoming and two outgoing tracks would look like?
Two incoming tracks is trivial, just add a second line, and connect the nearest 1/2 of the bridges to the first and the other 1/2 of the bridges to the second incoming line.
Two exit tracks are similar. Extend the bridges by one tile, and add a second line that connects to the 1/2 of the station exits that is furthest away.

You can repeat the trick, and have 3 lines each for 1/3 of the station, etc.

If you can use both sides, you can mirror the system and have a similar setup at the other end, doubling the length of the station.

There may be better solutions. One of the problems is that you have a long track under the bridges before you can sort out where each train must go to.
I never tried it, but maybe it's better if you go down one level for the exits and have enough width to sort out the leaving trains. The entering trains then get a flat bridge across the gap, and before them you can distribute the trains to all bridges.
Being a retired OpenTTD developer does not mean I know what I am doing.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Balancing trains over several tracks along the same route?

Post by Alberth »

pickpacket wrote: 18 Jun 2023 15:49 Screenshot at 2023-06-18 17-45-42.png

This design has a very high throughput at sorts the outgoing trains evenly over the two tracks (I never know when to use "track" and when to use "line"). It's a really efficient design, actually, but it's also very very *big*. I'm hoping someone here has better designs to share.
That's not a terminus station.

The exit side and the entry side are not balanced either. You have the same number of trains to handle in a period of time at bot sides. One side with 1 track for 6 station tracks, and the other side with 6 independent tracks is not balanced. The former side is the bottleneck in any case (you can't have 6 incoming lines running at full capacity and be able to squeeze all that traffic onto one line at the other side), so you can just remove at least 1/2 of the tracks at the farthest side of the station without noticeably sacrificing performance, I think.
Being a retired OpenTTD developer does not mean I know what I am doing.
pickpacket
Engineer
Engineer
Posts: 53
Joined: 26 Sep 2022 09:10

Re: Balancing trains over several tracks along the same route?

Post by pickpacket »

Alberth wrote: 21 Jun 2023 05:26
pickpacket wrote: 18 Jun 2023 15:49 Screenshot at 2023-06-18 17-45-42.png

This design has a very high throughput at sorts the outgoing trains evenly over the two tracks (I never know when to use "track" and when to use "line"). It's a really efficient design, actually, but it's also very very *big*. I'm hoping someone here has better designs to share.
That's not a terminus station.

The exit side and the entry side are not balanced either. You have the same number of trains to handle in a period of time at bot sides. One side with 1 track for 6 station tracks, and the other side with 6 independent tracks is not balanced. The former side is the bottleneck in any case (you can't have 6 incoming lines running at full capacity and be able to squeeze all that traffic onto one line at the other side), so you can just remove at least 1/2 of the tracks at the farthest side of the station without noticeably sacrificing performance, I think.
Possibly :) That station has gone through many tunings of the design and works better now than ever, but I don't assume it to be perfect. It does balance the trains very well, however. When adding new trains I just add them to one of the lines but after going through the station once they're almost exactly evenly divided over the two outbound tracks.

But no, it's not a terminus station. Which is my problem. A terminus is a lot less cumbersome and I would love to get the same or better performance and balancing from a terminus design.
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 391
Joined: 08 Nov 2019 23:54

Re: Balancing trains over several tracks along the same route?

Post by LaChupacabra »

pickpacket wrote: 18 Jun 2023 15:49 This design has a very high throughput at sorts the outgoing trains evenly over the two tracks (I never know when to use "track" and when to use "line"). It's a really efficient design, actually, but it's also very very *big*. I'm hoping someone here has better designs to share.
Well, I wouldn't say that such a station can have a very high throughput. I would rather say that it is quite low. ;)
I don't want to impose too much ready-made solutions, but I would have some general suggestions that might come in handy...

1. Avoid sharp turns (these are the most throughput-limiting)
2. Put signaling wisely, it doesn't have to be so dense on straight sections, but it is important just before forks or junctions of tracks (behind bridges, in the most sensitive places, you didn't put signaling)
3. For stations with very heavy traffic and fast trains, use pre-signalling (it's faster and more reliable)
4. Keep a gap of straight track between the fork in front of the station and the station (1-2 tiles are usually enough)
5. If you care about high capacity, avoid connecting separate lines, because it will never be more efficient than separate tracks. ;) Ok, it can be done, but these are not simple solutions, they take up a lot of space and require a lot of work to make it all work. In a casual game, simple solutions work better, but if you want to see what's possible, here's one example...

Once upon a time, I found it somewhere. Something really amazing. :)
ProZoneGame_13_Final.sav
(1.01 MiB) Downloaded 54 times

Also, your NewGRF with tea was intrigued me and decided to play around with it a bit. :)
I think it's a nice addition to the vanilla industry and I like it overall. A certain problem are wagons that have very slow loading/unloading. Since they are specialized wagons, they could have a slight advantage instead of a limitation. In their current form, their use is unfortunately pointless and they lose the competition with others. Besides, in the case of probably all sets, their presence is not necessary and often may not match the graphics or statistics to the others, so it might be worth adding an option to disable their availability. A certain inconvenience is that the final product cannot be transported by planes. I don't know the details of the code, but I suppose it may have the wrong cargo class assigned to it. The last problem I could think of is that at Chips/ISR stations you can't see the cargo accumulating. It can also be caused by the wrong cargo class. Other than that, the graphics and balance are more than ok, especially the people collecting the leaves. :)

I never build a multi-track line where trains can run on any one of them, so this may not quite suit your intentions, but if you're looking for a solution for efficient, high-capacity stations, maybe you'll find some inspirations here. ;)
[+] Spoiler
Image
Inglisz Ti, 2548-04-29.sav
(574.26 KiB) Downloaded 39 times
I've also included some tips on pre-signalling there - this type of signals can be very / most useful. ;)
Attachments
Inglisz Ti, 2521-07-19.jpg
(12.17 MiB) Not downloaded yet
I am sorry for may English. I know is bed.
pickpacket
Engineer
Engineer
Posts: 53
Joined: 26 Sep 2022 09:10

Re: Balancing trains over several tracks along the same route?

Post by pickpacket »

OMG! Thank you for all of these tips!
Well, I wouldn't say that such a station can have a very high throughput. I would rather say that it is quite low. ;)
Really? That station has trains loading on every platform continuously. As soon as one train rolls off the next one rolls on.

I've been trying to understand presignals lately but haven't really had time to play with them. I appreciate any tips on how they work :D
Also, your NewGRF with tea was intrigued me and decided to play around with it a bit. :)
I think it's a nice addition to the vanilla industry and I like it overall. A certain problem are wagons that have very slow loading/unloading. Since they are specialized wagons, they could have a slight advantage instead of a limitation. In their current form, their use is unfortunately pointless and they lose the competition with others. Besides, in the case of probably all sets, their presence is not necessary and often may not match the graphics or statistics to the others, so it might be worth adding an option to disable their availability. A certain inconvenience is that the final product cannot be transported by planes. I don't know the details of the code, but I suppose it may have the wrong cargo class assigned to it. The last problem I could think of is that at Chips/ISR stations you can't see the cargo accumulating. It can also be caused by the wrong cargo class. Other than that, the graphics and balance are more than ok, especially the people collecting the leaves. :)
❤️

When I made the mod I was still playing on version 12.2 sometimes. Cargo class wasn't a thing then and goods wagons couldn't be refitted to tea leaves or tea boxes. Another thing was that I was experimenting with having one big fat main train line all across the map and I wanted to be able to differentiate between ordinary goods and tea leaves/tea boxes at a glance ;)

But they actually have the right cargo class (as far I know; please correct me if I'm wrong: https://notabug.org/tinyrabbit/tea-tea- ... es.nml#L27). Planes, however, are not yet capable of handling cargo classes. And no, the graphics don't fit every set but there's not much I can do about that 🤷️ As for advantages over common goods wagons there aren't many, but they weigh significantly less than goods wagons. I was hoping that affects acceleration and uphill speed but maybe it's not noticeable. Tweaking loading speed sounds like a fun thing to do.

As for Chips/ISR stations I have no idea how they work, unfortunately.
trainrover
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 29 Nov 2014 23:23

Re: Balancing trains over several tracks along the same route?

Post by trainrover »

I still don't know how to use pre-signals, and I'd really like to try them out for a few troublesome termini where trains sometimes cannot score themselves paths into or out of the dead-end stations.
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3428
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: Balancing trains over several tracks along the same route?

Post by Emperor Jake »

pickpacket wrote: 23 Jun 2023 07:32

As for Chips/ISR stations I have no idea how they work, unfortunately.
Station sets are purely decorative, there's no gameplay difference between a Chips/ISR platform and a vanilla one. New cargo types such as your tea would have to be specifically coded and drawn into the station set in order to appear (again this is purely visual and has no gameplay effect)
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Balancing trains over several tracks along the same route?

Post by Andrew350 »

Assuming the big station is a drop off station, clearly the biggest thing is that you just need more platforms, that is why your input is clogging. Also balancing your network on the exit of your station is doing it very backwards; your trains should be balanced when they enter the station, not after leaving. Your biggest limit on station throughput (especially with ro-ro) is how many trains you can get into it, not out :)

The hardest part about a network that allows merging traffic to pick any line is that inevitably most trains will pick one over the other, leading to one line being over saturated and the other mostly empty. If you want a well-flowing network utilizing all available lines (without resorting to crazy coop contraptions) I think you'll always have to do a bit of manual "nudging" to force some trains onto different lines to maintain the balance and overall throughput. One easy trick is to put a backwards facing path signal on one of the entrances, like so:
Baker & Co., 2062-02-05#1.png
Baker & Co., 2062-02-05#1.png (33.18 KiB) Viewed 1748 times
The inner track was getting flooded with too many trains, so by placing this signal here (thereby increasing the pathfinder cost) most merging trains now take the outer track which is more empty up to this junction, therefore allowing better traffic flow on both main lines. Nothing is "forced" on one track or the other, but a little nudge like this in some places can help a lot in high traffic situations to avoid too many trains flooding one line or the other :) Alternatively you can do as LaChupacabra and simply force some or all trains onto certain tracks, which is better for overall traffic flow but does require you to manually maintain the number of trains on each line.

Also since you asked about how to use pre-signals, here is an example of an inline priority merger. This is a great use of pre-signals to help increase traffic flow on highly congested networks:
prio-example.png
prio-example.png (58.47 KiB) Viewed 1748 times
What it does is allow trains on the vertical line to keep flowing through as long as one enters the priority block before the previous one leaves it, therefore forcing trains on the other line to wait for a sufficient break in the traffic before continuing. This helps prevent the constant stop-start action of trains from both lines trying to zipper-merge together, which is terribly inefficient (at least here, real life traffic is a bit different :P). These things can be made longer so the priority is held longer with a bit more work and a different design, but that's getting a little deeper into the coop stuff so I'll skip it for now ;)

Also shown there in the blue circle is a simple switch to divert traffic from the inner line to the much-less-used outer line in case trains are stacked up due to the merger. This obviously helps keep trains flowing and can be useful in situations like this where far more trains use one line over another, but should be used sparingly since allowing trains to switch tracks can cause more slowdowns than it solves. In this case being able to divert to the outside line when there's a backup on the inner one proves very useful, so can be a valid tactic in helping overall throughput and load balancing on multiple mainlines, but it depends on your situation :)

As far as switching to a terminus station, it will take up less space but even a well-designed terminus station will incur at least a ~5-10% decrease in throughput, just based on the fundamental fact that trains have to exit over the same tile they enter. Not a huge problem but something to be aware of :) As for design ideas I'm quite fond of the basic design that Alberth explained, though I do it just a bit differently:
Baker & Co., 2060-08-17.png
(1.18 MiB) Not downloaded yet
This is a bit of an extreme example but does show essentially the same principle behind Alberths example and how you can do multiple lines in and out. This one is 4-in 4-out, but it can be expanded or split up however necessary :)

Also, a few general points:
  • Never use two-way block signals, they will only cause problems. Either make them all one-way block signals or use path signals instead.
  • If your platforms are full and you have trains waiting to enter, you either need more platforms or less trains.
  • As LaChupacabra pointed out, if you care about throughput get rid of the tight corners. It will take more space but traffic will flow much smoother.
  • At your station entrance where the tracks branch out, get rid of the signals in between the path signals, they are unnecessary and will cause trains to sometimes pick a suboptimal path
LaChupacabra
Route Supervisor
Route Supervisor
Posts: 391
Joined: 08 Nov 2019 23:54

Re: Balancing trains over several tracks along the same route?

Post by LaChupacabra »

Andrew350 wrote: 02 Jul 2023 01:27 The hardest part about a network that allows merging traffic to pick any line is that inevitably most trains will pick one over the other, leading to one line being over saturated and the other mostly empty.
It is possible to avoid overflowing only one of the tracks, but going further, you will find that it is best not to connect separate tracks. :mrgreen: And if connect, then as a last resort and in such a way that the paths of trains from different tracks cross as rarely as possible. ;)
Andrew350 wrote: 02 Jul 2023 01:27 As for design ideas I'm quite fond of the basic design that Alberth explained, though I do it just a bit differently:
This station looks interesting, but I don't think crossing the tracks is a good solution for heavy traffic. :)
I even suspect that it may not be possible to use all the platforms because of this - when you increase the number of trains, they will never take up all the platforms due to these intersections limiting the capacity of the entire station. Besides, this arrangement means that most trains will choose the same inner track on the way back. In the case of unloading stations, there is no point in building more than 4-5 platforms for 1 access track, because the only effect will be more space occupied by the station (unless the wagons are very slow to unload). In short: nice, pretty, but still not very effective. ;)
I am sorry for may English. I know is bed.
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Balancing trains over several tracks along the same route?

Post by Andrew350 »

LaChupacabra wrote: 02 Jul 2023 15:55 but going further, you will find that it is best not to connect separate tracks
Actually it was quite the opposite for me, I originally built each line separately like you but I found that a bit boring, so I later combined the networks together into one. I found the extra chaos to be a better challenge, personally :)
LaChupacabra wrote: 02 Jul 2023 15:55 In short: nice, pretty, but still not very effective.
K. Obviously we have different opinions on what "effective" means. All I care about is that all trains going to the station make it through without having to wait, and for that it is 100% effective. If it looks a bit overbuilt for the number of trains inside it that is by design, because I just recently rebuilt it to increase its capacity. This is what it looked like before:

Baker & Co., 2055-11-02.png
(1.19 MiB) Not downloaded yet
In that configuration (16 platforms, 2 tracks in, 2 tracks out) it was regularly filling up and causing trains to queue up at the entrance, hence the rebuild and expansion. Everything you speculated on about trains blocking each other and not utilizing the full capacity may sound plausible, but having used this station design for a long while I can tell you it is actually a very rare occurrence even in high traffic. The trains are surprisingly smart about which platforms to pick - most of the time at least :) Of course your mileage may vary depending on train length and other factors, but its proven to work great for me.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Chrill and 17 guests