What is the optimal gap (and direction) between rails?

Post all other topics which do not belong to any other category.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

What is the optimal gap (and direction) between rails?

Post by ssilk »

Given: 2-way rail system, one rail in each direction (*)

Question: if you take all into account like
- positioning of signals
- curve radius
- narrow space
- size of your rail network
- average train length
- moon constellation :)
- ...

What is the optimal distance between the rails? And in which direction (left/right-handed traffic)?


My solution is two rails distance, right handed traffic. In other words, if I have a track from left to right I have the lower rail to the right, then I leave two rails gap and then the upper rail to the left.
When I turn left on one rail (need to cross the main line) I can still place a chain signal, which is not possible with a lower distance. And at very narrow space I can reduce the distance to zero and still be able to place signals on both directions.

Extra question: how do you handle diagonals? I try to keep the distance, but I don’t count if it is now 2 or 3 gaps.

(*) under normal circumstances I see seldom the real need for more rails in one direction (in my opinion), but if not a second question: does it then make sense for multi-line tracks (many rails in one direction) to have different distances between the tracks?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by GrumpyJoe »

I'm sure there will be answers that say X is the right amount.
But to me it always depended on design, not optimizing.
I like having them symmetrical, and most of the time I include big power poles (or substations) in between them.
Also, when creating BP books, I like the rails to be chunk aligned, so they are created with chunk borders shown on the map. For long distances, you can create 4+ chunk straight BP.
(the reason I wrote small mod for them to reach 32 tiles instead of 30)

When I started, I read somewhere that the most space effective crossings demand LHD because of signal placement possibilities. But since I never cared about space and I can't get my head around LHD, I never bothered.
Historically I believe railsways were all LHD because they came from England, and some train enthusiasts keep telling me real world LHD is, for some reason, to be preferred. But I don't get their arguments, and a lot of tracks are RHD nowadays. Austrian railroad switched their last major line to RHD a few years back. No idea about the rest of Europe.
So, meh, go for what ever you prefer. I'll never get my brain to work with LHD

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Koub »

I learned the hard way, when building a chunk sized, chunk aligned rail system, that if parallel rails are spaced only by enough room to fit 2 rails, then it's not enough to get optimal throughput on 4 way crossings. It works with 4 rail spaces between lines though.
Koub - Please consider English is not my native language.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2677
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by mmmPI »

What do you call optimal ?

Do you mean for UPS ? best throughput with least amount of rail ? easiest to build such as lowest footprint ?

according to this test : https://mulark.github.io/tests/test-000 ... 00025.html :

One should avoid diagonal tracks for UPS.
On straight tracks , the spacing between them doesn't impact UPS.

according to this one : https://mulark.github.io/tests/test-000 ... 00051.html

One should definitely avoid diagonal track, even if it is to go around some ore patch.
( i read those as an answer to 'how do you handle diagonal' ).

Also worth noting that the spacing between rails for diagonals is important as it impact a lot the UPS, the less space the worst especially under 5 tiles.

If you don't use any spacing between rails, you can't properly signal T junction and keep the throuput. But it looks cool allow for the lowest footprint, and is faster to build with robots while driving a loco because the distances are reduced. Also you are forced to use Right-handed traffic due to not having any room to signal in between both track.

The minimum spacing you need to be able to properly signal "T junction" and/or "+ junction" i think is as you said 2 rails/4 tiles in between both rails.

Having more space i think is a waste, it takes more time to build due to robots travelling more distance when building them.

For the spacing if you have multiple lane, imo it is very important to have enough room to make a S bend to switch from one to another.

I don't think average train lengh have much impact here. At least from 2 to 20 wagons as an order of magnitude, i'm not counting extreme settings like 256 wagons trains, i'm not familiar with those but my guess is that it wouldn't change much either.

Also despite all i said, i very often use no gaps in my rails and build them diagonals or straight for the looks of it while making sure the network isn't busy to the point where it matters. And if it does i just use extra spacing only at junctions so i have room to place signals :).

mmmPI
Smart Inserter
Smart Inserter
Posts: 2677
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by mmmPI »

GrumpyJoe wrote:
Wed Sep 30, 2020 6:28 am
Historically I believe railsways were all LHD because they came from England, and some train enthusiasts keep telling me real world LHD is, for some reason, to be preferred.
I think i read something about medieval times, knights were keeping their swords on the left side, so it was easier to use with right hand (and most people are right-handed, left-handed was considered "evil" in those days ).
Hence when walking on narrow path people would try to keep their left to avoid their swords hitting each others, they kept them on the outside.
It was considered the traditionnal side for walking and was reproduced for cars and trains.

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Serenity »

Yeah, this has nothing to do with "optimizing" whatever that means. Some configurations are better than others for certain things, but there are too many things to take into account there

I like three spaces. Gives you more spots for signals in intersections. And you can put laser turrets around the power poles

I use RHD. In reality RHD and LHD are both used in various countries. Even Europe uses a mix.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Koub »

mmmPI wrote:
Wed Sep 30, 2020 6:43 am
What do you call optimal ?

Do you mean for UPS ? best throughput with least amount of rail ? easiest to build such as lowest footprint ?
Sorry, I wasn't precise enough. Optimal as maximum throughput given the following constraints. The whole intersection must :
- fit within one chunk
- be invariant by rotation as for inputs and outputs
- be immune to deadlocks ...
- including auto-deadlocks by trains of size 6 or less (I want my first rail system ever to be at most 2 locomotives/4 wagons).

My initial rail system was rails separated by 2 rail spaces, and I couldn't find a way to signal so that throughput is as high as it should for 4 way intersections (T junctions were OK).

With 4 rail spaces in between both lines, however, it's possible to signal the intersection so that only trains that cross paths have to wait (hence optimal throughput).

Also I use RHD, because my brain is wired this way and that's what I instinctively built the first time I tried.
Koub - Please consider English is not my native language.

User avatar
Nosferatu
Fast Inserter
Fast Inserter
Posts: 228
Joined: Fri Jan 20, 2017 4:48 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Nosferatu »

5 - RHD

Because i don't care how much space it takes on straight lines, but I don't like it when I have to make a dent into the straight line on junctions only to make place for those that trains that have to turn left.
Clipboard02.png
Clipboard02.png (1.09 MiB) Viewed 15269 times

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by JimBarracus »

I leave a gap of two just like op, but I use LHD, because I can put the signals in the middle.
I usually run power lines along every track and place them in the middle.
At every second power pole I place signals in the small gap between the power pole and the rails.
The gap of two leaves enough space for radars and roboports, if needed.

The inner curve gets the smallest radius and the outer curve starts at the same point where the inner one and is technically two 45° turns.
I avoid intersections and use mostly T-intersection.

Around my base I use one big roundabout. It makes the train do some detours but they all go in the same direction. Works quite well. Almost no stops in order to wait for other trains.

Diagonal tracks are for me an early game thing and are freestyle. I usually only expand straight into any direction

mmmPI
Smart Inserter
Smart Inserter
Posts: 2677
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by mmmPI »

Koub wrote:
Wed Sep 30, 2020 8:08 am
My initial rail system was rails separated by 2 rail spaces, and I couldn't find a way to signal so that throughput is as high as it should for 4 way intersections (T junctions were OK).
With 4 rail spaces in between both lines, however, it's possible to signal the intersection so that only trains that cross paths have to wait (hence optimal throughput).
what about this one ?
Hidden-failed-one



It includes loop, isn't symetrical and doesn't have straight line if you don't turn.
But it should make only train crossing path of each other to wait, is pretty compact and can be reverse for LHD.

Edit: it is symetrical but i don't know the wording in english to describe that kind of symetry :D


2nd Edit : this one is missing 4 signals as shown here : viewtopic.php?p=514538#p514538

mmmPI
Smart Inserter
Smart Inserter
Posts: 2677
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by mmmPI »

Koub wrote:
Wed Sep 30, 2020 8:08 am
given the following constraints. The whole intersection must :
- fit within one chunk
My initial rail system was rails separated by 2 rail spaces, and I couldn't find a way to signal so that throughput is as high as it should for 4 way intersections (T junctions were OK).
This is the problematic constraint, if you don't force yourself into a restricted space for the junction itself it is possible to have a 4 way junction properly signaled with less spacing between rails than 4, hence i need to correct my previous statement, 2 rail spacing is not the minimum required, it seems even 0 spacing is ok.

2-Rail-space



0-spacing

User avatar
Khagan
Fast Inserter
Fast Inserter
Posts: 232
Joined: Mon Mar 25, 2019 9:40 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Khagan »

ssilk wrote:
Wed Sep 30, 2020 6:00 am
What is the optimal distance between the rails? And in which direction (left/right-handed traffic)?
I've settled (like many others seem to have) on a gap of two rails (four tiles) between non-diagonal tracks. I use left-handed traffic, since that's what I'm accustomed to and also because having the signals in between the rails is more convenient (though less realistic). My normal long-distance tracks are always aligned with the centreline either along a chunk boundary or exactly in the middle of the chunk (i.e. on a 16 cell fixed alignment).
ssilk wrote:
Wed Sep 30, 2020 6:00 am
Extra question: how do you handle diagonals? I try to keep the distance, but I don’t count if it is now 2 or 3 gaps.
I used to try and maintain (approximately) the same distance as on the orthogonal rails, but I've now switched to much wider spacing for the diagonals, which I find works better for modular construction. (The narrower diagonals don't leave enough spaces for signals at junctions, so you need the diagonal spacing inside a junction wider than elsewhere, so they don't overlay nicely on existing rails.)

ssilk wrote:
Wed Sep 30, 2020 6:00 am
does it then make sense for multi-line tracks (many rails in one direction) to have different distances between the tracks?
The only places I usually have multiple tracks in the same direction is at stations, where the spacing is determined by the loading/unloading requirements, or in stackers, where there is no reason not just to pack them in as tightly as possible (a one rail/two tile gap to allow for signals).
Ignorable rant
As far as junctions are concerned, I mostly use Ts. If I need a 4-way, I prefer (mini-)roundabouts, which are smaller and simpler than a full Grand Union, and can also serve as reversing loops. The only case that the Grand Union handles better is that of two opposing trains both making a 'difficult' turn (a right turn for lefthand traffic or vice versa): the Grand Union can pass both simultaneously, while the roundabout can only manage one at a time.

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Koub »

mmmPI wrote:
Fri Oct 02, 2020 3:45 am
Koub wrote:
Wed Sep 30, 2020 8:08 am
given the following constraints. The whole intersection must :
- fit within one chunk
My initial rail system was rails separated by 2 rail spaces, and I couldn't find a way to signal so that throughput is as high as it should for 4 way intersections (T junctions were OK).
This is the problematic constraint, if you don't force yourself into a restricted space for the junction itself it is possible to have a 4 way junction properly signaled with less spacing between rails than 4, hence i need to correct my previous statement, 2 rail spacing is not the minimum required, it seems even 0 spacing is ok.
Indeed, but the fact it can be done with a gap of 4 between rails makes it my preferred gap so far :)
Koub - Please consider English is not my native language.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by ssilk »

There was the question about “what is optimal?”.

I think about optimal like in nature: over millions of years there are optimal designs for some purposes. We have here also millions of game-hours, so we can think about optimal designs.

But each person has of course different preferences - this thread shows that very well: some have the aspect on cpu, some on blueprints...

If we put that all together it could be possible to have some kind of picture. No mathematical evidence, but a clear “do it more like this and avoid that”.

Aspects I can think about:
- space usage: for straight rail I need - with a gap of 2 rails - 16 tiles per rail-length. With a gap of 5 (I also used that design once) we need 28 tiles, nearly doubled. But it has the advantage to have space left between the rails.
- cpu-usage: for cpu this seems to be useful to have a larger gap for diagonal tracks. (I’m not the option to avoid diagonal tracks at all, because they are shorter and you spare sqr() of length and so the sqr() of time on that diagonal track)
- speed: obviously a larger gap will add length to all paths you make. The question is how much.
- deadlocks: how easy is it with a given gap to built junctions that don’t tend to deadlock?
- blueprintability: Why should all fit into a chunk? Couldn’t it be 34x34? Or something like 30x40? What makes 32x32 more “optimal” than other dimensions?
[And besides that: T-junctions are proven to be “faster” in many aspects and tend to have less deadlocks than 4-way-junctions - but that is a completely different thread :) ]
- compatibility of blueprints: I think the most important factor for compatibility between blueprints is not the grid-size, but the gap-size. If - as it looks like for now - most people build with a gap of 2, well, then it is more useful to built also with a gap of 2.

More aspects may be added by others. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Aru
Fast Inserter
Fast Inserter
Posts: 212
Joined: Wed Apr 13, 2016 11:31 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Aru »

I have a book of compact fully signalled 4-way 2-railroad junctions of every spacing from 0 tiles to, I think 10, all right hand drive. So, any spacing would be fine for intersections. I didn't bother exploring left hand, I imagine the equivalents to most designs would be inferior.

My conclusion was that I want 4 tiles (2 rails) between same-direction tracks, the minimum which still allows compact lane changes. 2 tiles makes them vastly larger. And I went with the same spacing between the middle, opposite-direction tracks, because the 4-way 4-lane intersection I made really doesn't work well with a smaller spacing in the middle, and because it looks prettier with all the same spacing. I doubt I could have made a worthwhile 4-way 4-lane design for a uh, 4-2-4 tile spacing anyway.

So, I use the same spacing for my 2 lane designs as well, simply so that the straight rails are forward-compatible with the 4 lane designs. Not a particularly crucial reason, but considering the disadvantage is just.. 2 tiles narrower rails anyway, 18 instead of 20 for 4 lane? Worthwhile to use the 4 tile spacing. 0 in the middle doesn't allow separating the lanes for left turn merges / exits, so the only acceptable smaller option is 2 tiles. Another reason against the tighter spacing, is that if tighter spacing is ACTUALLY needed for some reason (a long landfill stretch maybe?), it can easily be shifted into and back with a trivial design.

If I were completely confident I would never ever use 4 lanes, I would only have 2 tiles between. If I needed more throughput from a certain area or intersection, I would change to 4 lane. But I don't use tiny trains, they make more traffic, so train throughput is not really a concern.

Diagonals, as in diagonal rails? I don't use them in designs. It's the same number of rail pieces as non-diagonal, the only advantage is a shorter distance if the destination happens to be on a diagonal. But the shortest distance to a main rail is always perpendicular; a single mining station doesn't need such distance optimization; more than one station in that general direction makes branching off with a proper intersection that can be extended later appropriate, which in turn again makes the diagonal less useful. And diagonal is more likely to conflict with other rails later. So I just end up not using diagonals at all anywhere.

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by astroshak »

I used to use a 3 train tile gap between my rails (6 tiles). I had a set of functional BP’s for it and all.

I decided, however, that I wanted to improve my BP’s, and that led me to widening the gap slightly, to 4 rail tiles (8 base tiles) between tracks.

If I wanted to expand to a 4 track system, I would do so by putting the new tracks outside the existing ones, four (two rails) away, allowing me to put in lane changes.

I do NOT care about chunk alignment. Honestly, I do not see any point in it. My BP’s are the length of three max-length Large Power Poles placed for both power transfer to outposts, as well as for lining up with the existing rail system.

User avatar
Khagan
Fast Inserter
Fast Inserter
Posts: 232
Joined: Mon Mar 25, 2019 9:40 pm
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by Khagan »

astroshak wrote:
Fri Oct 02, 2020 8:34 pm
I do NOT care about chunk alignment. Honestly, I do not see any point in it.
I do for two main reasons.
  1. It avoids annoying mismatches when connecting stretches of track built separately or from opposite ends. With alignment, the minimum mismatch is the alignment spacing, which is enough to justify dropping in an S-bend on the rare occasions it happens. Without, it's really easy to get two lines that are supposed to join be just one or two track widths off, and then the only effective solution is to completely rebuild one of them.
  2. It reduces the number of different intersection configurations, especially when using diagonal rails. Without alignment, there could be a dozen different variants of a junction like this one:
    Y-junction.png
    Y-junction.png (415.73 KiB) Viewed 14784 times
    With alignment, I need just two, which are mirror images of one another.

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by astroshak »

I include Large Power Poles within my rail BP’s. I use those for alignment. It works rather well; I have yet to have a misalignment with them when using them properly.

Outside of offshoots going to and from stations, in particular the stackers, I avoid diagonal rails anyway. Personal preference there.

ribsngibs
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Mar 28, 2016 5:42 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by ribsngibs »

I run with 4 lanes (2 in each direction). Well, a lot of the base is 2 lane, but I've set up my rail so that my 4 lane blueprints paste directly over the 2 lane one, so the 2 lane version are spaced for 4-lane junctions.

My answer is: the opposite direction lanes are split by 3 rail distance, and the lanes that are going the same direction are split by 2 rail distance. So rail, 2 spaces, rail, 3 spaces, opposite rail, 2 spaces, opposite rail.

I have LHD traffic - I am not sure if this is why I needed more space to fit all my chain signals or if I just designed my intersections poorly, but I was unable to fit chain signals inside every little triangle that gets formed in a 4-way 4-lane intersection with out making it much larger than necessary - but increasing the middle spacing by a single rail distance made it possible.

On diagonals I don't care so much, but you basically get the choice to make the rails slightly too close or slightly too far; I choose "slightly too close".

User avatar
tobsimon
Fast Inserter
Fast Inserter
Posts: 104
Joined: Wed Apr 29, 2015 10:58 am
Contact:

Re: What is the optimal gap (and direction) between rails?

Post by tobsimon »

I like a one track tile gap with right hand drive.

It's not the easiest to use, as it's too narrow for S-bends for dead-end stations, but I think it looks best. Spacing on diagonals is two track tiles and not too far off from the spacing of the orthogonal track (ca. 2.1 compared to 2.0 center to center). I always use at least one straight track between two curves, so the circle looks less crocked and the track can be centered towards a roundabout.
Track.png
Track.png (1.62 MiB) Viewed 14597 times

A signal fits between the rails on left turns (wouldn't fit with left hand drive) and double spaced tracks (3 track tiles gap) can have signalled symmetric S-bend crossings, which I use in railyards in front of dead-end stations.
Railyard.png
Railyard.png (1.71 MiB) Viewed 14597 times

Post Reply

Return to “General discussion”