Page 1 of 1

Chunk-aligned modular railway system

Posted: Sat Feb 18, 2017 7:33 pm
by quinor
After playing for a bit with railways I have discovered that there are always alignment problems. Like, for example, never enough space for a station or a crossing. The answer to that were modular systems but I could never force my modules to place power poles and signals consistently and my inner OCD screamed alot. Also, there was way more hand-routing rails than I would prefer. I have solved all of those problems though with modular railway blueprint system that is additionally chunk-aligned. Yes, you do have to use f5 to correctly align building blocks, but it gives you major speedup in rail-laying, great ease of rail planning and is very OCD-friendly.

What I'm presenting below is in no way optimal, complete nor finished, but it's what I'm using right now and does the job really well for me.

The modules are as follows (left to right, top to bottom): straight rails, end loop, 3-way crossing, unloading station base, outpost station for ores, unloading station bay module, outpost station for crude oil. There is no 4-way crossing becouse I couldn't fit it in one chunk though surprisingly I never felt like I need one. There is also no 90-degree turn, but, again, never needed one. I prefered to make long straight rails finishing with loops and branch from those. Loading stations are meant for 1 train only, that's why no waiting bays. Unloading station has got a small waiting bay in form of this curvy-loopy rail, it holds 5 trains. Everything is fitted for 1-2 trains.
modules
modules with grid turned on

Below there is a map I've been playing, developing and testing those railways; about . Becouse on my map there is not very much water, I did not need any 90-degree turns. Most of rails were laid after claiming the area for ease of player transportation, that's why they don't lead anywhere. About building outposts, I simply make a branch from main railway, place few straight blocks, then outpost station and a loop.
map

A few random associated thoughts:
  • You could do a train stop at the end of every loop. Those are usual locations you go to when passenger-driving.
  • I wish that Big Electric Poles were of wire reach 32 (chunk size) not 30. Same for substations, 16 reach instead of 14... Things should have power-of-two sizes/ranges ;)
  • You do like radars to see your trains and placing them along rails (every 7 chunks) is an excellent method of doing that.
  • Chunk-aligned main bus style factory modules are not that stupid. Haven't tested.

For the last part, blueprint book to load from Foreman tool.
BLUEPRINT STRING

Re: Chunk-aligned modular railway system

Posted: Sun Feb 19, 2017 12:27 pm
by Nilaus
I am myself struggling a bit with the proper rail setups, so it is nice to be inspired.
I like the idea of aligning it to chunks. The loops at the end of each can generate detours as I see it: When a train is done loading at an outpost it has 2 options for returning; Taking the returning track or continuing to the loop and then returning. It doesn't happen often when the train network is not fully utilised, but as it get more congested strange pathing happens. However, your setup will not jam.
Additionally, I think you need stackers by your unloading stations (this is a hint to me that it is not particularly congested train network)
You main line below your base can be rather crowded with only 2 tracks. Is that a problem you are seeing? My experience is that 4 tracks is where the problems with jamming and pathfinding really starts happening

Re: Chunk-aligned modular railway system

Posted: Sun Feb 19, 2017 6:31 pm
by quinor
Detours are not a problem at all. No jams, that's VERY big deal for me :) Lack of stack inserters on outpost station loading from belt is just resource optimisation, you don't need those while loading from belt to chests with multiple inserters. There are though (or should be) stack inserters everywhere else. I don't have enough trains on the main line to jam yet. When this base turns into a megabase and I might have bottlenecks on "main" line I will probably move to a different system. From what I know 4-track system due to pathing isn't at all 2x better from 2-track one and I would be rather smartly placing unloading stations (ie. separate "main" lines for copper and iron) to reduce load of the critical lines.

Re: Chunk-aligned modular railway system

Posted: Mon Feb 20, 2017 2:10 pm
by Deadly-Bagel
Your intersection is pretty similar to mine:
Three Way Intersection
Not as compact as yours but symmetrical, and I use regular signals where rails split (still use chain for merges and crosses) because a train stuck behind you is stuck behind you no matter where you park. Just means they can creep forward a little more.

Hard to tell at a glance but do your power poles form a sort of grid that you base all the rail locations off? So that if you loop around something you guarantee it will meet up on the other side (should you want to).

Re: Chunk-aligned modular railway system

Posted: Mon Feb 20, 2017 3:45 pm
by quinor
I might have been inspired by your design among others. About "normal" signals inside: I want a train entering the intersection to leave it asap, that's why no regular signals inside. Matter of throughout and reliability. Also, blocks should be longer than your longest train to prevent deadlocks - again reliability. And a couple of tiles doesn't really make a difference in overall efficiency.

Re: Chunk-aligned modular railway system

Posted: Wed May 10, 2017 11:07 pm
by sparr
Can you elaborate on why chunk alignment is relevant here? What will go wrong if I use your system but just offset everything by 3 tiles east and 7 tiles north?

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 1:07 am
by iceman_1212
sparr wrote:Can you elaborate on why chunk alignment is relevant here? What will go wrong if I use your system but just offset everything by 3 tiles east and 7 tiles north?
i am also curious about this. is it purely for aesthetics when playing with grid debug option turned on?

also, these three signals can be rail signals, in case folks are still using this version of the intersection. just need to leave sufficient space until the following rail signal. Image

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 7:25 am
by quinor
sparr wrote:Can you elaborate on why chunk alignment is relevant here? What will go wrong if I use your system but just offset everything by 3 tiles east and 7 tiles north?
Nothing, it will work just as well as long as you keep the offset on every chunk the same. The deal is, if you chunk-align it, you can start building rails from two sides and they'll match anyway. Every time. Brainless. Also, if you use map view you can leave x chunks of free space and if you know your build is x chunks wide it will fit perfectly. For example, 2x2 chunk solars+roboport or chunk-aligned walls :)

I've also made (for my game) other chunk-aligned peices of factory. I was inspired by viewtopic.php?f=8&t=8377 and wanted to extend that concept into entire game.

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 9:11 am
by Aeternus
What's the deal with that weird S track? I don't see how that is useful.

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 9:18 am
by sparr
Aeternus wrote:What's the deal with that weird S track? I don't see how that is useful.
Without that, that side of the station connection would extend outside the chunk to the left.

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 9:28 am
by quinor
Ahh, almost. It's the waiting bay for trains, fits 3 1-2 trains afair.

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 3:27 pm
by Shokubai
Deadly-Bagel wrote:Your intersection is pretty similar to mine:
Three Way Intersection
Not as compact as yours but symmetrical, and I use regular signals where rails split (still use chain for merges and crosses) because a train stuck behind you is stuck behind you no matter where you park. Just means they can creep forward a little more.

Hard to tell at a glance but do your power poles form a sort of grid that you base all the rail locations off? So that if you loop around something you guarantee it will meet up on the other side (should you want to).
Your signals are in the wrong order. Your chains should be regular and your regular should be chains except for those center chains.

Re: Chunk-aligned modular railway system

Posted: Thu May 11, 2017 4:26 pm
by quinor
I see, it's weird though I haven't noticed it earlier...

Re: Chunk-aligned modular railway system

Posted: Fri May 12, 2017 1:37 pm
by Deadly-Bagel
iceman_1212 wrote:also, these three signals can be rail signals, in case folks are still using this version of the intersection. just need to leave sufficient space until the following rail signal.
Shokubai wrote:Your signals are in the wrong order. Your chains should be regular and your regular should be chains except for those center chains.
No, this is exactly as it needs to be. Chain Signals are required directly before where the rails cross and I additionally use chains for every signal after the intersection to ensure there is enough room for the train to stop at the next regular signal without blocking the junction. It's mainly to allow two of these to be placed next to each other or for tight loops that would otherwise leave a signal very close to the junction and allow the junction to be blocked, I've done this as a result of trial and error. It's safer this way.

The outer signals (eg Southbound turning West) don't need to be chains because there isn't an intersection, it doesn't matter if the train queues up on the side there as it wouldn't be blocking anything that wouldn't be blocked anyway. I've used this intersection design heavily and never had any problems, the only issue is if you put two next to each other (for a pseudo-four-way junction) and you have a bunch of loops and your trains like changing direction mid-intersection then it can get deadlocked but that's a problem with Factorio itself, not the intersection.

Re: Chunk-aligned modular railway system

Posted: Thu May 18, 2017 10:09 pm
by iceman_1212
Deadly-Bagel wrote:
iceman_1212 wrote:also, these three signals can be rail signals, in case folks are still using this version of the intersection. just need to leave sufficient space until the following rail signal.
Shokubai wrote:Your signals are in the wrong order. Your chains should be regular and your regular should be chains except for those center chains.
No, this is exactly as it needs to be. Chain Signals are required directly before where the rails cross and I additionally use chains for every signal after the intersection to ensure there is enough room for the train to stop at the next regular signal without blocking the junction. It's mainly to allow two of these to be placed next to each other or for tight loops that would otherwise leave a signal very close to the junction and allow the junction to be blocked, I've done this as a result of trial and error. It's safer this way.
Agree that chains are required directly before crossings to prevent deadlock. Only in very specific situations are chains required after the crossing to prevent deadlock in a 2-rail network and I guess I disagree re: including them in a blueprint that will be used everywhere.

Re: Chunk-aligned modular railway system

Posted: Fri May 19, 2017 4:59 am
by Miravlix
iceman_1212 wrote:Agree that chains are required directly before crossings to prevent deadlock. Only in very specific situations are chains required after the crossing to prevent deadlock in a 2-rail network and I guess I disagree re: including them in a blueprint that will be used everywhere.
I've mentioned it before. Chain signals creates deadlocks.

Two way rail:

Chain -> North/south line -> rail signal
rail signal <- North/south line <- chain

Have a train come and reserve the east->west lane, before it leaves a train arrives from west and reserves the line, then another east train reserve the line, over and over and North/South is now deadlocked, unable to get access past the other trains.

You might call it a soft deadlock, because maybe the deadlocked direction will someday get an opening, if the traffic allows it, but it is something touted to be the way to go for inexperienced train operators, when it should be avoided at all cost, unless you're a train expert and know what you're doing. You definitely should never ever recommend usage of chain signals without a BIG FAT disclaimer about the problems of them.

Re: Chunk-aligned modular railway system

Posted: Fri May 19, 2017 1:03 pm
by Deadly-Bagel
Miravlix wrote:Have a train come and reserve the east->west lane, before it leaves a train arrives from west and reserves the line, then another east train reserve the line, over and over and North/South is now deadlocked, unable to get access past the other trains.
You're going to need to provide a screenshot or something, even of just the intersection.

Chain signals don't cause any more deadlocks than regular signals - functionally they are identical to moving the next regular signal up other than that they allow travel within the same chunk (so to speak) as long as the paths don't intersect. The only problem with them is that trains can change their path mid-intersection and suddenly stop somewhere they shouldn't, but that's a pathing issue rather than an issue with chain signals.
iceman_1212 wrote:I guess I disagree re: including them in a blueprint that will be used everywhere.
Why not? The impact on throughput is virtually nonexistent and this solves any problems related to having regular signals too close for whatever reason, or the rare occasion a train runs out of fuel just past the intersection. On the occasion you do need them due to nearby signals or w/e you don't need to put them in, they're already there.

Going more in-depth on the throughput (which is really the only negative), it just means trains can't follow each other quite as closely. Given the speed they travel at you're only slowing the second train by something like 0.3s total for the entire route (as once the gap is established it's irrelevant if further intesections have these signals), not nearly enough to make a quantifiable difference. In high-throughput train networks where an intersection might see 30+ trains every minute yeah this becomes more of an issue but given that circumstance you would be better off designing a better rail network.

Re: Chunk-aligned modular railway system

Posted: Tue Apr 10, 2018 7:52 pm
by sparr