Multiple Stops On 1 Rail

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
dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

Multiple Stops On 1 Rail

Post by dood »

So I've made a new game in which I'm going for 1-1 trains only which obviously leads to throughput issues and the need for multiple unloading stations.
After some experiments with parallel stations which were horribly space inefficient, I wished I could make trains just line up to be unloaded simultaneously on 1 rail, simulating a longer train but unfortunately, inserters wouldn't interact with trains stopped by signals.

Then it occured to me that I could just have several stations in a row and each except for the last one only activates if there is a train unloading in the next one and I came up with this:

Image
Blueprint
It's a storage station that can stack up to 16 outpost and 9 production trains and load up to 4 of them simultaneously on 1 rail.

Has anyone else tried doing this before?
It's a prototype that I haven't put in my actual map yet so suggestions on how to improve it would be much appreciated.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Multiple Stops On 1 Rail

Post by Aeternus »

Doing this, you need to give priority to unloading the train furthest down the line for loading/unloading (as that one is the first that has to depart, it's blocking the remaining trains) and disable the stations closest to the stacker until the rear one is occupied or the train will continually go to he first station in the line. This kind of setup can work but a parallel unloading/loading dock is probably more efficient.

dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

Re: Multiple Stops On 1 Rail

Post by dood »

Yeah I did that in the blueprint. Disabled all stations except the furthest down, then enable the second furthest if a train stops at the furthest, then the third furthest, etc.
It does a serviceable job once the buffers are full and unloads 4 trains evenly but if the buffers run out, empty trains can get stuck behind the still unloading train in the front and it's a bit wonky.

I'm asking for optimizations.

Bauer
Filter Inserter
Filter Inserter
Posts: 346
Joined: Fri May 05, 2017 12:48 pm
Contact:

Re: Multiple Stops On 1 Rail

Post by Bauer »

I have a system to unload ore at my melting facility with a series config of stations.

The train-leave condition is triggered when the next station is free. Only the last station allows the train to leave only when empty.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Multiple Stops On 1 Rail

Post by Aeternus »

dood wrote:It does a serviceable job once the buffers are full and unloads 4 trains evenly but if the buffers run out, empty trains can get stuck behind the still unloading train in the front and it's a bit wonky.

I'm asking for optimizations.
Well, you need to load the furthest station that is occupied to keep this thing running smoothly. That means crossconnecting the ore inputs (so that earlier input stations can divert their goods to the furthest currently used output station) and prioritizing loading the last train in the queue. The recent priority splitter can be used for this, along with disabling ore input to a station that currently has no train.
That however will cause delays in loading as the whole thing will be bottlenecked, stations will not be receiving goods if there's no trains, so no preloading. You could switch the whole thing to bot based and set the requestor chests to only be active if the station is in use. Bots can deliver goods over short distances very fast, so the bottleneck isn't there unless you need extreme throughput.

dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

Re: Multiple Stops On 1 Rail

Post by dood »

Alright, I added a shifter to prioritize the last station.
I also noticed I didn't need the decider combinator for this.
Simply altering between red and green wire does the trick.

Image

Is this how to do the shifts? They're a bit wonky when it comes to diverting 2 belts but at least 1 full belt will now be forced into the lastmost empty station.
Also I have solved the empty train waiting while being blocked thing by adding a wait 60 seconds condition for unloading trains.
That means up to 4 trains will make unnecessary trips every minute but in exchange, eventually all buffers and trains are full so it'll be primed to handle maximum throughput.
Blueprint
Aeternus wrote:You could switch the whole thing to bot based and set the requestor chests to only be active if the station is in use. Bots can deliver goods over short distances very fast, so the bottleneck isn't there unless you need extreme throughput.
I'm using a stacking mod that compresses items by a factor of 5 so those 8 belts you see there are actually 40 belts worth of throughput.
If it weren't for that, I would be doing this with bots. No way in hell am I balancing 40 belts.

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: Multiple Stops On 1 Rail

Post by JimBarracus »

How come you end up with so short trains?
Do you smelt on site?

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: Multiple Stops On 1 Rail

Post by Aeternus »

As he said above, mod that compresses cargo by a factor of five. So these are effectively trains with 5 wagons I suppose.
As for the empty train being blocked - solve that by a second priority splitter row in reverse, prioritizing taking cargo from the front unloading station if available. And eliminate the chests your train unloads in, dump directly onto the belt.

dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

Re: Multiple Stops On 1 Rail

Post by dood »

JimBarracus wrote:How come you end up with so short trains?
Do you smelt on site?
I decided to go with 1-1 trains. Because I'm stupid like that.
And yes.
Aeternus wrote:As he said above, mod that compresses cargo by a factor of five. So these are effectively trains with 5 wagons I suppose.
As for the empty train being blocked - solve that by a second priority splitter row in reverse, prioritizing taking cargo from the front unloading station if available. And eliminate the chests your train unloads in, dump directly onto the belt.
Not quite. I use deadlocks stacking beltboxes which also reduces stack size of stacked items by a factor of 5 so all that changes is that trains are being loaded and unloaded 5 times faster.

As for the blockade, this probably can't be solved with priority splitting since the issue is a train with something like 8 plates left in it blocking empty trains due to a miniscule balancer imperfection.
That kind of thing happens if 4 full trains fill a stream of single trains.

As for the chests, I need a small buffer because the trains take their sweet time stopping and going on the way to the stations.

dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

Re: Multiple Stops On 1 Rail

Post by dood »

Alright so I solved the wonky unloading by throwing a whole lot of combinator logic at it.
The trains will now only start to get unloaded once all 4 are in position and as soon as 1 of them is empty, all of them get a signal to leave.
To use this, you have to set "L>1" as the condition for the unloading trains and of course name all unloading stations the same.

Take care to manually name the stations though, copypasting will also overwrite some logic and break it.
Oh yeah also you need at least 4 trains for any unloading to happen, obviously but with tiny 1-1 cockroaches, that should be a non-issue.

I've also added a whole bunch of signals which got rid of a lot of stop and go for a much improved throughput, pretty close to simulating a 4 wagon train.
BP

Post Reply

Return to “Railway Setups”