4-way intersections: Throughput and deadlocks [image heavy]

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.
User avatar
hansjoachim
Fast Inserter
Fast Inserter
Posts: 159
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by hansjoachim »

dacendoran wrote:
Mon May 18, 2020 1:17 am
You guys should totally start the new topic!
Yeah, definitely. Its just some things I want to get ready first. Like improving blueprints, making LHD ans RHD versions and I want an easier to use 3.x testbench which merges the manual and auto tester
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

tamanous
Fast Inserter
Fast Inserter
Posts: 125
Joined: Wed Aug 10, 2016 8:35 am
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by tamanous »

optimisation. never. ends.

Sopenas
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Aug 27, 2015 12:48 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by Sopenas »

Hi,

During my last play-through I used trains very extensively. I used 4 lanes setup (2 one way 2 another), my trains were all with one locomotive and one wagon. I used LTN mod. For train intersections I have used only Multi-Cross junction which I copied from OP.
I have achieved my goal of having 1 rocket launched per minute at least for some time but by the end it was obvious this setup was on its limits because there were so many one wagon trains going everywhere that in some spots both two one sided tracks were full of trains and my system slowed down. Multi-Cross
Junctions actually worked fine.

For my next play-through i plan to go bigger. I plan to use 8 lanes setup (4 one way 4 another). I plan to use trains with 2 locomotives and 4 wagons. But now i am considering a junction type what I should use. Multi-Cross for 4 lines was great but it had an issue that it takes a LOT of space to build. And for 8 lines and larger trains it might go out of hand. But maybe I should go for it since it has best throughput.

So maybe you have suggestions on junction type and blueprints :) . Btw. all my junctions are of the same type. Whatever junction I choose it will be the only one I will build.

Thanks

coppercoil
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by coppercoil »

Sopenas wrote:
Tue Jul 21, 2020 10:48 am
For my next play-through i plan to go bigger. I plan to use 8 lanes setup (4 one way 4 another). I plan to use trains with 2 locomotives and 4 wagons.
I think 8 lane designs are very ineffective. You still need many waiting lanes just before junction and right after it, but not in between the junctions. I believe all 4-8 lane designs I have seen are not able to compress interconnection traffic, because junctions are the bottlenecks, that's because they have not enough of waiting lanes, so those numerous interconnecting lanes are just ineffective substitute for it. You can explore my 2-lane design that compress traffic to the limits.

I'm not sure whether 2 lanes would be enough for you, especially if you use relatively short 2L4C trains. But I did not see any 4-lane junctions that I could call effective (I analyzed them, but I didn't test, so please forgive me if I'm wrong). I'd say 8 lanes are just nonsense in a working factory. Note, "cell" railway design is an exception, because there are no room for traffic compression.

aka13
Filter Inserter
Filter Inserter
Posts: 273
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by aka13 »

I am no junction expert, so I rely on your opinion/judgement. I plan running 4/16 trains for marathon deathworld megafactory, onsite smelting, individual networks for each ore type, just to be sure. What junctions are the best right now? I assume, that 4-way is still rather unneeded, and 3-way are king as they always have been?
Pony/Furfag avatar? Opinion discarded.

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

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by mrvn »

coppercoil wrote:
Tue Jul 21, 2020 10:39 pm
Sopenas wrote:
Tue Jul 21, 2020 10:48 am
For my next play-through i plan to go bigger. I plan to use 8 lanes setup (4 one way 4 another). I plan to use trains with 2 locomotives and 4 wagons.
I think 8 lane designs are very ineffective. You still need many waiting lanes just before junction and right after it, but not in between the junctions. I believe all 4-8 lane designs I have seen are not able to compress interconnection traffic, because junctions are the bottlenecks, that's because they have not enough of waiting lanes, so those numerous interconnecting lanes are just ineffective substitute for it. You can explore my 2-lane design that compress traffic to the limits.

I'm not sure whether 2 lanes would be enough for you, especially if you use relatively short 2L4C trains. But I did not see any 4-lane junctions that I could call effective (I analyzed them, but I didn't test, so please forgive me if I'm wrong). I'd say 8 lanes are just nonsense in a working factory. Note, "cell" railway design is an exception, because there are no room for traffic compression.
If you want to go bigger than double up on the train length or quadruple the train length. You get far more out of that than dubling the number of lanes. The extra lane switching and crossings at the intersections give you a diminishing return for each lane added. A train taking a right (or left) turn from the outer lane will block all other lanes. There is no way around that. The more lanes you have the more other trains will get blocked by one train taking a turn.

Alternatively design your factory to have less intersections. For example start with putting the smelters at the outside with direct feeds from the mines. There is no reason why ore trains should cross paths of other trains. Then take that further and build intermediate products in a ring between the main base and the smelters. Again you can easily build the rail network to not have intersections. If you do that for electronic circuit boards and plates you have probably covered a large portion of train traffic already.

User avatar
hansjoachim
Fast Inserter
Fast Inserter
Posts: 159
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by hansjoachim »

aka13 wrote:
Sun Sep 20, 2020 8:16 am
I assume, that 4-way is still rather unneeded, and 3-way are king as they always have been?
Where did you get that from and can you prove it?
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

aka13
Filter Inserter
Filter Inserter
Posts: 273
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by aka13 »

hansjoachim wrote:
Sun Sep 20, 2020 2:48 pm
aka13 wrote:
Sun Sep 20, 2020 8:16 am
I assume, that 4-way is still rather unneeded, and 3-way are king as they always have been?
Where did you get that from and can you prove it?
Oh no, don't get me wrong, I am not making any statements like that, I was genuiely curious. I overheard it on the forums somewhere a couple of years ago, I think, but I am not sure.
So 4-way is not throughput limited, compared to 3-way?
Pony/Furfag avatar? Opinion discarded.

User avatar
hansjoachim
Fast Inserter
Fast Inserter
Posts: 159
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by hansjoachim »

aka13 wrote:
Mon Sep 21, 2020 7:37 am
hansjoachim wrote:
Sun Sep 20, 2020 2:48 pm
aka13 wrote:
Sun Sep 20, 2020 8:16 am
I assume, that 4-way is still rather unneeded, and 3-way are king as they always have been?
Where did you get that from and can you prove it?
Oh no, don't get me wrong, I am not making any statements like that, I was genuiely curious. I overheard it on the forums somewhere a couple of years ago, I think, but I am not sure.
So 4-way is not throughput limited, compared to 3-way?
I recommend making as many 4-way intersections as reasonably possible on your mainline over 3-way intersections.
I did a quick test, which shows that unbuffered 4 ways are slightly better. If we go to max throughput buffered 4 way can get about 25% higher throughput than two 3 way intersections with all random.

Comparing 4 way to 3-way intersections
4-way unbuffered throughput 2-4 trains
https://pastebin.com/5kxDRK9r
All random ~49 trains per min
3-way traffic ~44 trains per min

3-way intersection
https://pastebin.com/41hT5qKi
All random with two 3 way intersections ~46 trains per min
3-way traffic ~44 trains per min
Attachments
3 way 2 on a row.png
3 way 2 on a row.png (97.04 KiB) Viewed 1075 times
3 way compact.png
3 way compact.png (57.13 KiB) Viewed 1075 times
4 way compact.png
4 way compact.png (91.03 KiB) Viewed 1075 times
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

aka13
Filter Inserter
Filter Inserter
Posts: 273
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by aka13 »

Thank you very much for the information, noted and will be aplied.
Pony/Furfag avatar? Opinion discarded.

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

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by mrvn »

I think the comment about 3-ways being better than 4-ways only applies when you either have no crossings in the 3 way or the majority of the trains will not cross a lane.

So if your trains come from the left and go to the right it's better to put all the factories on one side of the track with 3-ways and sort them so items always move left to right. It's the lane crossing that cuts down the throughput mostly.

User avatar
hansjoachim
Fast Inserter
Fast Inserter
Posts: 159
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by hansjoachim »

mrvn wrote:
Fri Sep 25, 2020 2:55 pm
I think the comment about 3-ways being better than 4-ways only applies when you either have no crossings in the 3 way or the majority of the trains will not cross a lane.

So if your trains come from the left and go to the right it's better to put all the factories on one side of the track with 3-ways and sort them so items always move left to right. It's the lane crossing that cuts down the throughput mostly.
That is why I tested for 3 way traffic on both the 3 way intersection and the 4 way intersection and they both got 44 trains per min. So you save space building less intersections which can be used to build buffered intersections instead
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

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

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by mrvn »

hansjoachim wrote:
Sun Sep 27, 2020 4:34 pm
mrvn wrote:
Fri Sep 25, 2020 2:55 pm
I think the comment about 3-ways being better than 4-ways only applies when you either have no crossings in the 3 way or the majority of the trains will not cross a lane.

So if your trains come from the left and go to the right it's better to put all the factories on one side of the track with 3-ways and sort them so items always move left to right. It's the lane crossing that cuts down the throughput mostly.
That is why I tested for 3 way traffic on both the 3 way intersection and the 4 way intersection and they both got 44 trains per min. So you save space building less intersections which can be used to build buffered intersections instead
Having a 3 way going right and a bit later a 3 way going left is basically a 4 way with a buffer in the middle. :) Seems the effects cancel each other out.

Koub
Global Moderator
Global Moderator
Posts: 6328
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by Koub »

mrvn wrote:
Tue Sep 29, 2020 10:26 am
Having a 3 way going right and a bit later a 3 way going left is basically a 4 way with a buffer in the middle. :) Seems the effects cancel each other out.
I see one exception to this : I'm currently designing a chunk aligned (and chunk sized) rail system (with 2 lanes). It's possible to signal optimally a T junction within a single chunk, however the 4 way intersection can only be signalled suboptimally (because of the lack of space to fit all the rails and all the signals). In that kind of edge case, 2 T junctions allow more throughput than a single 4 way junction.
I might be wrong, because I find quantum physics more understandable than train signalling, but I'm almost sure I'm right.
Koub - Please consider English is not my native language.

User avatar
hansjoachim
Fast Inserter
Fast Inserter
Posts: 159
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by hansjoachim »

Koub wrote:
Tue Sep 29, 2020 3:47 pm

...however the 4 way intersection can only be signalled suboptimally (because of the lack of space to fit all the rails and all the signals).
Challenge accepted

https://pastebin.com/Jbp7qZ1Y
44 trains per min with random which is on par with other correctly made unbuffered 4 way intersections
4 way chunk.png
4 way chunk.png (741.37 KiB) Viewed 850 times

You can also make it like this to prevent U-turns
https://pastebin.com/mEmuq6G8
4 way chunk almost round.png
4 way chunk almost round.png (830.56 KiB) Viewed 845 times
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

mmmPI
Filter Inserter
Filter Inserter
Posts: 606
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by mmmPI »

Here is a version of the one just above that also fits in one chunk, the only difference ( i see ) is the spacing of the rails.
(Edit: it also uses 4 less chain signals)

It is very similar to the "crossabout" featured in page 1 which is just a bit too big for 1 chunk.
4wayjunction.png
4wayjunction.png (966.99 KiB) Viewed 812 times

User avatar
hansjoachim
Fast Inserter
Fast Inserter
Posts: 159
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by hansjoachim »

mmmPI wrote:
Thu Oct 01, 2020 4:04 am
Here is a version of the one just above that also fits in one chunk, the only difference ( i see ) is the spacing of the rails.
(Edit: it also uses 4 less chain signals)
It's not the same. The signaling isn't optimal, its missing 4 chain signals
It prevents trains going at the same time if trains from south or north is going left and if trains from west or east is going right.
Attachments
4wayjunction missing signals.png
4wayjunction missing signals.png (897.29 KiB) Viewed 806 times
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

mmmPI
Filter Inserter
Filter Inserter
Posts: 606
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by mmmPI »

Indeed i made a mistake there.

I tried to fit in those missing signals while keeping the same rail spacing and trying to keep it chunk-sized but with no sucess.

best i could do is still missing 2 signals

4wayjunction3.jpg
4wayjunction3.jpg (300.49 KiB) Viewed 792 times

Koub
Global Moderator
Global Moderator
Posts: 6328
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by Koub »

If I'm not mistaken, you can't do that optimally with that rail spacing. I tried to do the same thing as you, but failed. I could solve my issue with the help I got from hansjoachim. (designed my own intersection, only reused the rail spacing).
Koub - Please consider English is not my native language.

mmmPI
Filter Inserter
Filter Inserter
Posts: 606
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: 4-way intersections: Throughput and deadlocks [image heavy]

Post by mmmPI »

Koub wrote:
Thu Oct 01, 2020 7:36 am
If I'm not mistaken, you can't do that optimally with that rail spacing. I tried to do the same thing as you, but failed. I could solve my issue with the help I got from hansjoachim.
Well i tried for a few hours because you mentionned it in the other post, i enjoyed it despite no sucess, it helps against insomnia and boredom :)

If i was prooven it is mathematically impossible it would ruin the fun, i prefer thinking it may be possible using other approach than the loop, it's the same feeling like grinding for a rare item in MMO except it feel less dumb and repetitive, the hope of sucess keeps me eager to try !

That may explain the mistake, after some time attention to details is not as good :)

Post Reply

Return to “Railway Setups”

Who is online

Users browsing this forum: No registered users