Crash & jam safe train exchange network (RHD LCC trains)

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
Theikkru
Filter Inserter
Filter Inserter
Posts: 417
Joined: Wed Mar 27, 2019 2:18 pm
Contact:

Crash & jam safe train exchange network (RHD LCC trains)

Post by Theikkru »

I've made it a personal mission not to succumb to the most common cause of death in Factorio, and so far, I've avoided the achievement. I attribute that success to my train network design, which has built-in signals that warn which tracks have moving trains on them. To start, here's the book:

This network has a train for every station, and divides those stations into schedules of one home station and multiple outpost stations. Resources are transported by allowing a pair of trains per schedule—one at home, and one at an outpost—to swap places.
Train routes between stations must be unambiguous, a lot of bitwise math is required to run the rail network, an additional local circuit network is required for all the home stations, and it's a bit of a bear to learn how to use, but once you get the hang of it, it's relatively simple to set up, very safe, desync-proof, and surprisingly satisfying to watch. Here's a save file demonstrating it in the field:
example.png
example.png (4.1 MiB) Viewed 298 times
Primary.zip
(17.52 MiB) Downloaded 6 times
user guide
1.0 version
Last edited by Theikkru on Sat Apr 12, 2025 4:47 pm, edited 12 times in total.
Theikkru
Filter Inserter
Filter Inserter
Posts: 417
Joined: Wed Mar 27, 2019 2:18 pm
Contact:

Re: Crash & jam safe train exchange network (RHD LCC trains)

Post by Theikkru »

I've updated some circuitry to account for edge cases relating to the train pairs arriving at their destination stations at greatly disparate times, and added an extra example station to the save to demonstrate resource distribution to outposts (as opposed to the default of resource collection from outposts).
Here's a more zoomed out shot:
zoom.png
zoom.png (3.98 MiB) Viewed 1592 times
Edit: fixed another circuit bug, and cleaned up some wires.
Theikkru
Filter Inserter
Filter Inserter
Posts: 417
Joined: Wed Mar 27, 2019 2:18 pm
Contact:

Re: Crash & jam safe train exchange network (RHD LCC trains)

Post by Theikkru »

Overhauled for Factorio 2.0. I considered trying to extend this from a one-to-many system to a many-to-many system with the new power of interrupts, but ultimately decided that the marginal benefit wasn't worth the added complexity. (Would require significantly more server circuitry, and trying to eliminate race conditions would be a PITA.) The new grouping and scheduling has made train management simpler, though, so I've written a user guide. I've left the old 1.0 version in at the end for posterity's sake, but that demo no longer works out of the box in 2.0 due to the discontinuation of automated station skipping.

P.S. as of version 2.0.23, one of the track pole blueprints is bugged.

Edit: moved some components to improve visibility and resolve an asymmetry, and changed some circuitry to eliminate a desync edge case when trying to disable a station while a train is trying to depart.
Theikkru
Filter Inserter
Filter Inserter
Posts: 417
Joined: Wed Mar 27, 2019 2:18 pm
Contact:

Re: Crash & jam safe train exchange network (RHD LCC trains)

Post by Theikkru »

Updated everything in the first post to account for a few minor changes, some blueprint renaming for ease of use, and to compensate for a change in version 2.0.39 (probably the one addressing bug 118475) that causes trains to interrupt their presence signals when switching between two stops of the same name; said change resulted in thrashing of the launch signals and train desyncs when trying to release trains under previous blueprints.
The bugged track pole blueprint mentioned in the previous post has been fixed as of version 2.0.42.
The rail network in the example save has also progressed somewhat, and showcases the use of multiple rail signals/multiplexers to extend a rail network beyond 31 segments.
Post Reply

Return to “Railway Setups”