Page 1 of 1

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

Posted: Sun Sep 08, 2024 4:22 am
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 (3.52 MiB) Viewed 664 times
Primary.zip
(11.28 MiB) Downloaded 22 times
user guide
1.0 version

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

Posted: Sat Sep 14, 2024 12:05 am
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 1156 times
Edit: fixed another circuit bug, and cleaned up some wires.

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

Posted: Fri Nov 29, 2024 10:29 pm
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.