Factorio

Factorio

Not enough ratings
How to disable train station when a train is present.
By Dingo
This guide describes simple method of how to disable train station while train is present, so all other trains will bypass that station while existing train is present.
   
Award
Favorite
Favorited
Unfavorite
Preface
I've been looking for a way to disable station when train is present to prevent congestion at my train refueling depot, while packing more trains closer together and preventing deadlocks. I have found multiple ways how to do this online, but they were all either complicated, or they wouldn't/couldn't work with pre-existing circuit network. This solution works standalone, and as a part of existing circuit network. Different circuit wire color is used to isolate one network from the other, and to isolate stations from eachother so only one specific station gets disabled.
Requirements
Only requirement beside Railway is Circuit Network research.
How it works
This method uses the fact that stations are capable of reporting the train ID back to the circuit network.
Train ID's are always greater than zero, so the circuit signal is always raised whenever train is stopped at a station.
Since the train is already standing still at the station, disabling the station does not affect it. While every other train with that station in its list, will automatically reroute to next available station whenever it encounters disabled station in its stop queue.

We can use all this to avoid waiting lines just about anywhere, where multiple trains tend to come together and create temporary congestion, and slowing things down.
Getting it together
We will use two signals:
- station input signal, and also decider output signal
- station output signal, and decider input signal

You may chose any signals you wish, these are the two signals i am not likely to use on my dedicated train circuit network.

  • Place Decider Combinator near the station.
  • Connect both input and output terminals of the combinator to the station.
  • In station menu, make sure that Enable/Disable, and Read stopped train are both checked.
  • Set enabled condition to < 1, then set output signal to
  • In the connected decider combinator, set parameters to > 0, then set output to and select the 1 radio button.

That's it, you are done. :)

Whenever train stops at a station, will be set to the train's id, the decider will pick it up, and set to 1, which in turn, will disable the station, the second the train leaves, the train ID signal ceases to be read by the station, that resets the decider output to 0, and re-enables the station.
Blueprint
Ready made blueprint from the example image:

0eNqdlFlOwzAQhu8yzy5K0oViIS6CkOXE0zIisS3bqaiq3B0vEApUoPKSaPzP+k2cE7T9iNaRDsBPQJ
3RHvjjCTzttezTWThaBA4UcAAGWg7JCk6SXvhgLEwMSCt8BV5P7M9AhR0pdIvODC1pGYw7S9BM
TwxQBwqEpY1sHIUehxZdrPBbHgbW+BhqdKoe0y3qmzWDI/AqloiTBWd60eKzPFB0jz7vSUTUVA70
6XRHzgfxY44DuTDGk7mF4rGwpF+gFPBBJo5VMgYrXW6Lw0OMMWOw4xVZHaqS1B5je6MOYuf
MIEjHLMB3svc4laIau7n1Oj32DlGf0yOV0Ub35ld9Svv7Rry5tPIfpKsZsyJX+gG+uQy9I9eNFD6h/4P5T
OcDef0N+X2W3yuhlm2PQpFPb+DBjcjAoVQijWNRiTzch5KNWbryQ7hmKfVnj9k8439BzitiECcu1ABS
qb5QLZdjH5dwc7etlndNvY6verVZMWizJpO2+ipO6cLlC8rPfgQMDuh82eH2tqk2681yu5qmN9ruals=
6 Comments
Dingo  [author] 27 Feb, 2020 @ 8:48pm 
@DADBAR yup, i'd blow my brains out if i ever saw you playing factorio :)
coastal boats in 7.0 27 Feb, 2020 @ 7:23pm 
Didn't work, reactor six went into full meltdown, thanks I guess? :friendly::winter2019sadsnowman:
Engi 2 Jan, 2020 @ 10:48pm 
Thanks, this has allowed me to make an automated refueling station and now not need to worry about my trains running out of fuel on the private server I run.
Hurtflute 5 Jul, 2018 @ 9:29pm 
Thanks a lot, it realy helped. You can do it even easier:
1) Connect Electric Pole with circit to Station
2) Enable Condition: T = 0
3) Output Signal: T
Brambletess 2 Jun, 2018 @ 1:02pm 
Very helpful, and super easy to do (i did it 50 times)
Vegizer 25 May, 2018 @ 6:19pm 
Very helpful, and super simple to do!