Smart Station for outposts

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.
Post Reply
Yandersen
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Sun Jun 30, 2019 6:54 am
Contact:

Smart Station for outposts

Post by Yandersen »

Assume you have dozens of mining posts of multiple sizes scattered around the map. And train network grid coverage over the large area. And one centralized unloading location, from which trains dispatched empty and return full of ore. When you need more ore, you build another outpost somewhere, connect the rails to the grid and... Hell, you need to build another bunch of trains? And what if some of the outposts depletes - you need to scrap the trains? Argh, I am too lazy for this micromanagement! :)

[EDITED (19-08-2019)]:

So I came up with an idea of a self-disabling loading station: disabled by default, it turns on only when it's bay get enough material accumulated to fill up the train. So if all the stations collecting the same resource share the same name, then trains choose to visit only those which are full and ready!

Surprisingly, it turned out that automating stations to behave this way is extremely easy: just use green (or red) wire to connect all loading boxes with each other (this way we get the sum of all their contents) and stretch the wire from there to the station; then check the "Enable/disable" checkbox and set the condition for the station to be enabled (see the pic below):
Image
(it may be hard to see on the pic above, but all 6 boxes are connected sequentially with a red wires)
In the example above the station will turn on and start accepting trains when the sum of material (any of the same kind) inside the boxes will be over 2000, which is the capacity of a single cargo wagon carrying raw ores.

Save your time, let your trains decide where to go shopping today! :)
Last edited by Yandersen on Mon Aug 19, 2019 4:28 pm, edited 3 times in total.

User avatar
Nova
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Mar 04, 2013 12:13 am
Contact:

Re: Smart Station for outposts

Post by Nova »

How does that work with many trains? I mean, you could have 30 trains trying to visit Station A, but the station only has resources for one train. After this one train is filled, the leftover 29 trains try to visit Station B - but that station also only has resources for one train. The leftover 28 trains try again Station A because there are enough ores again. How does the game handle that?
Greetings, Nova.
Factorio is one of the greatest games I ever played, with one of the best developers I ever heard of.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Smart Station for outposts

Post by mrvn »

It's called the thundering herd problem. The game handles this badly. Or more precise most rail networks won't like 30 trains bouncing between A and B and never getting any work done.

You don't want 30 trains with 2 mining outpost. You want 2 trains with 30 mining outposts. Or at least more outposts than trains and you want most of them enabled. If there are trains wandering around empty not able to find an outpost to fill up from then you don't have enough mining outposts. You're smelters will run empty and you will run out of plates. So build more.


Yandersen: You should drop the wire to the signal. There is no need for it. Simply disabling the station will cause all other trains to repath to some other stop. When you disable the signal any train stuck behind that signal will remain stuck until the station has enough goods again. But f you drop the wire to the signal then the train will simply drive through the disabled station and go somewhere else.

You can also improve the station: If a train is present subtract 2000 from the item count and add the train content. If the total is less than 2000 then the station doesn't have enough items for a second train and you deactivate it with the train still present. The train will finish loading but any other trains will not pick this station anymore.

Yandersen
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Sun Jun 30, 2019 6:54 am
Contact:

Re: Smart Station for outposts

Post by Yandersen »

mrvn wrote:
Mon Aug 19, 2019 10:51 am
But f you drop the wire to the signal then the train will simply drive through the disabled station and go somewhere else.
Holy guacamole, you r right! Then there will be no need for a mentioned chain signal for detour! That smart, will work on that. Thank you!
mrvn wrote:
Mon Aug 19, 2019 10:51 am
You can also improve the station: If a train is present subtract 2000 from the item count and add the train content. If the total is less than 2000 then the station doesn't have enough items for a second train and you deactivate it with the train still present. The train will finish loading but any other trains will not pick this station anymore.
Hah, nope. At the moment the station disabled any loading train leaves it immediately, so it will leave unfull. Tried that.

User avatar
ranzolger
Inserter
Inserter
Posts: 29
Joined: Fri Jun 01, 2018 6:40 pm
Contact:

Re: Smart Station for outposts

Post by ranzolger »

Yandersen wrote:
Mon Aug 19, 2019 2:25 pm

Hah, nope. At the moment the station disabled any loading train leaves it immediately, so it will leave unfull. Tried that.
They once made it this way, but repatched it back in. I'm using circuit controled trainstations aswell and its working just fine. Maybe it has something to do with the wait conditions (i mostly use empty/full cargo), or maybe you're not on the latest 'experimental' build (>17.60 ?!?).
Last edited by ranzolger on Mon Aug 19, 2019 3:07 pm, edited 1 time in total.

Yandersen
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Sun Jun 30, 2019 6:54 am
Contact:

Re: Smart Station for outposts

Post by Yandersen »

SimmonS wrote:
Mon Aug 19, 2019 2:56 pm
Yandersen wrote:
Mon Aug 19, 2019 2:25 pm

Hah, nope. At the moment the station disabled any loading train leaves it immediately, so it will leave unfull. Tried that.
They once made it this way, but repatched it back in. I'm using circuit controled trainstations aswell and its working just fine. Maybe it has something to do with the wait conditions (i mostly use empty/full cargo), or maybe you're not on the latest 'experimental' build (17.60 ?!?).
Damn it! Just tried and it works! I can swear that when I tested it few days ago train rushed to leave the station immediately when it get disabled and loading was unfinished. Oh well. Now I see that even the combinator not needed here - just a wires across all boxes and the station and *>2000 condition do the job. So simple. Feel myself dumb now... ;(

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Smart Station for outposts

Post by mrvn »

Yandersen wrote:
Mon Aug 19, 2019 2:25 pm
mrvn wrote:
Mon Aug 19, 2019 10:51 am
But f you drop the wire to the signal then the train will simply drive through the disabled station and go somewhere else.
Holy guacamole, you r right! Then there will be no need for a mentioned chain signal for detour! That smart, will work on that. Thank you!
mrvn wrote:
Mon Aug 19, 2019 10:51 am
You can also improve the station: If a train is present subtract 2000 from the item count and add the train content. If the total is less than 2000 then the station doesn't have enough items for a second train and you deactivate it with the train still present. The train will finish loading but any other trains will not pick this station anymore.
Hah, nope. At the moment the station disabled any loading train leaves it immediately, so it will leave unfull. Tried that.
Try again. That's not how it worked before. Did they break that recently?

Yandersen
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Sun Jun 30, 2019 6:54 am
Contact:

Re: Smart Station for outposts

Post by Yandersen »

Hah, truly, it is so simple! Just use a control wire to connect ALL boxes with each other and the station, configure the condition when the station should start inviting visitors and voila! No combinators needed at all. Hm, works like that. What was the problem with it initially? IDK, doesn't matter now. :)
The header post edited. No need to post blueprint for a few wires.

Post Reply

Return to “Railway Setups”