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.
Koub
Global Moderator
Global Moderator
Posts: 7784
Joined: Fri May 30, 2014 8:54 am
Contact:

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

Post by Koub »

mmmPI wrote: Thu Oct 01, 2020 8:17 am 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 !
Until you learn you've been farming the wrong mob all along. When I was a kid, I was given a "hard problem to solve" by a friend. I tried for years, until a math teacher of mine when I was 18 saw me try to solve it, and just told me "good luck with that, it has been mathematically proved it can't be done".
I'd rather know something is impossible, but when it's possible, try as long as needed to succeed :). That's why with hansjoachim's post, once I knew it was possible by just changing my input/output rail spacing, I found my own implementation.
Koub - Please consider English is not my native language.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3629
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

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

Post by mmmPI »

I hope you had fun looking for the answer of that hard problem :D And also that you learned stuff along the way ! practiced things that you'd become familiar with. Maybe the proof of impossibility was someting a 18 Yo person that try to solve math problem for fun could remember, and that would give you confidence and good mark if it was in the math program of an exam later in your studies :)

I wonder how/if it could be prooven that a particular layout cannot be achieved with a set of rail and space constraint in factorio.

I'd start by looking for the minimum amount of block necessary, It seems like there is 24 chain signal required and 4 regular signal. Also i think it requires 12 blocks. Some blocks being shared sometimes i think each trains needs to go through minimum 4 blocks and i would try this direction if i wanted to proove it impossible.

But to occupy myself when i can't sleep i'd rather try to make it work by using different methods :) it's funnier, after the loop my thought was to try if it was possible with input and ouput misaligned, and/or also with input and ouput at 45° vs orthogonal, and i can guarantee it feels less dumb than doing 10000 times the same boss rush hoping for that 0.01% item to have the proper stats :)

Sometimes when you don't know it's impossible you make it happen IRL, like having the bankster apologize for excessive fees, or getting along with neighbours that are usually very noisy but hey, at this point it's becoming philosphical and i don't want to make you moderate my offtopic :)
Dechou
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 09, 2019 6:21 pm
Contact:

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

Post by Dechou »

The 4 lane intersection called "traditional" on the OP has a very high throughput for its size, compared to others that seem rather similar but have a lot less. Only the big buffered intersections have more. Can someone explain me why this one is so good, if it really is ?
mmmPI
Smart Inserter
Smart Inserter
Posts: 3629
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

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

Post by mmmPI »

Dechou wrote: Mon Oct 05, 2020 9:49 am The 4 lane intersection called "traditional" on the OP has a very high throughput for its size, compared to others that seem rather similar but have a lot less. Only the big buffered intersections have more. Can someone explain me why this one is so good, if it really is ?
This junction doesn't allow the 2 lane to turn left ( the difficult turn ) only the inner lane can, it would probably require a lane switch before the junction if you happen to have a train on one of the outter lane that wants to turn left.

This makes it so that there are less rail overall and less crossing. Maybe it can explain.
User avatar
hansjoachim
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

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

Post by hansjoachim »

mmmPI wrote: Mon Oct 05, 2020 10:05 am
Dechou wrote: Mon Oct 05, 2020 9:49 am The 4 lane intersection called "traditional" on the OP has a very high throughput for its size, compared to others that seem rather similar but have a lot less. Only the big buffered intersections have more. Can someone explain me why this one is so good, if it really is ?
This junction doesn't allow the 2 lane to turn left ( the difficult turn ) only the inner lane can, it would probably require a lane switch before the junction if you happen to have a train on one of the outter lane that wants to turn left.

This makes it so that there are less rail overall and less crossing. Maybe it can explain.
Yeah, it was tested with 4 large lane switchers. I think it shouldn't be in the Original post.
Dechou
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 09, 2019 6:21 pm
Contact:

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

Post by Dechou »

hansjoachim wrote: Mon Oct 05, 2020 4:57 pm
mmmPI wrote: Mon Oct 05, 2020 10:05 am
Dechou wrote: Mon Oct 05, 2020 9:49 am The 4 lane intersection called "traditional" on the OP has a very high throughput for its size, compared to others that seem rather similar but have a lot less. Only the big buffered intersections have more. Can someone explain me why this one is so good, if it really is ?
This junction doesn't allow the 2 lane to turn left ( the difficult turn ) only the inner lane can, it would probably require a lane switch before the junction if you happen to have a train on one of the outter lane that wants to turn left.

This makes it so that there are less rail overall and less crossing. Maybe it can explain.
Yeah, it was tested with 4 large lane switchers. I think it shouldn't be in the Original post.
Oh I see that changes everything, thanks.

So I'll go ahead and ask another question, reading the few last pages I'm not to sure what I should do in my situation.
If I want to build a very big train grid base (with classical 100x100 city blocks) with 1-4 trains (modded, train acceleration and speed are way higher than vanilla, and the amount and variety of things to ship per block are also way higher than vanilla), should I use 2 or 4 lane system, 3 way or 4 way intersections, in order to optimize the throughput ? It makes no sens for me to use bigger trains, there is to much different things to ship as input to a block.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3629
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

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

Post by mmmPI »

The relative position of city blocks based on what is produced in them i think has a strong impact, if you have a lot of back and forth between 2 corners of the grid you increase a lot the amount of goods that need be shipped and/or the distance compared to having the blocks requiring them being adjacent( which could be hard to anticipate for a complex modded game).

4 way junction i think would allow for more direct path over long distances. Which could or not be required based on previously mentionned factor.

grid plan allows for somewhat organic growth, you can start with a 2 lane system that allows for an easy upgrading to 4 lane if you design your blueprint with this in mind.

A trick up your sleeve to answer problems that always occur along the road on big project :)
User avatar
hansjoachim
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

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

Post by hansjoachim »

Dechou wrote: Mon Oct 05, 2020 5:41 pm
Oh I see that changes everything, thanks.

So I'll go ahead and ask another question, reading the few last pages I'm not to sure what I should do in my situation.
If I want to build a very big train grid base (with classical 100x100 city blocks) with 1-4 trains (modded, train acceleration and speed are way higher than vanilla, and the amount and variety of things to ship per block are also way higher than vanilla), should I use 2 or 4 lane system, 3 way or 4 way intersections, in order to optimize the throughput ? It makes no sens for me to use bigger trains, there is to much different things to ship as input to a block.
My experience with moded trains is that they are so OP that they take all the challenge out of building train networks. You just need to connect everything and you will probably be fine
Dechou
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sat Mar 09, 2019 6:21 pm
Contact:

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

Post by Dechou »

Well then I will just plan the grid correctly, and go with anything that's pretty and functionnal and not worry about throughput. Thank you for freeing me from those worries.
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

Dechou wrote: Mon Oct 05, 2020 5:41 pm So I'll go ahead and ask another question, reading the few last pages I'm not to sure what I should do in my situation.
If I want to build a very big train grid base (with classical 100x100 city blocks) with 1-4 trains (modded, train acceleration and speed are way higher than vanilla, and the amount and variety of things to ship per block are also way higher than vanilla), should I use 2 or 4 lane system, 3 way or 4 way intersections, in order to optimize the throughput ? It makes no sens for me to use bigger trains, there is to much different things to ship as input to a block.
You should plan this recursively. Make a 4x4 grid with 2 lanes. then build a 4x4 grid of those with fast lanes between them. Then agian 4x4 grid of those with express lanes and so on.
<X>
Inserter
Inserter
Posts: 22
Joined: Tue Oct 27, 2020 7:14 pm
Contact:

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

Post by <X> »

pew. 34 pages are a lot. But I haven't found the one I was building on the first page. Ive struggled with building a non-roundabout intersection within 1 city block, where 1-4 trains are able to wait between 2 train signals. And I came up with this beautiful flower:
train-intersection.jpg
train-intersection.jpg (366.35 KiB) Viewed 11786 times
It's compact and a lot better than the basic intersection or roundabout. I like it so far



[EDIT] There are chain signals at the entry, of course, but they're behind the path, so that the path stays free, if the train has to wait
hornetDC
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Dec 03, 2020 10:57 am
Contact:

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

Post by hornetDC »

Is there an updated throughput testing mod?
foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

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

Post by foamy »

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. (designed my own intersection, only reused the rail spacing).
You can, but not with RHD. Take mmmPI's layout, switch it to LHD, and you get full signalling.

Image
mmmPI
Smart Inserter
Smart Inserter
Posts: 3629
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

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

Post by mmmPI »

foamy wrote: Fri Dec 04, 2020 6:50 am You can, but not with RHD. Take mmmPI's layout, switch it to LHD, and you get full signalling.
You modified it nicely ! i couldn't think of it when i was at it, nice !

( be careful there are 2 signals that are not switch to LHD yet, north-west it is still outside the circle, and east between the two tracks too. and also the north entrance still has the regular signal in case you feel like blueprinting :) ) .
foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

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

Post by foamy »

Woops! I just threw it together as an example since I knew it could be done; unfortunately in that game the rail net is RHD, so I wound up with the same layout you did. Then I copied it & converted it to LHD for the screencap, but I guess I missed some bits. Obviously you'd want to actually signal it correctly if you were building one for real :v
Last edited by foamy on Sat Dec 19, 2020 6:24 am, edited 1 time in total.
KuniXl
Burner Inserter
Burner Inserter
Posts: 9
Joined: Thu Aug 04, 2016 2:05 pm
Contact:

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

Post by KuniXl »

Does anyone update the pastebins? e.g. 2-lane compact righthanddrive links to https://pastebin.com/5kxDRK9r :evil:
Most of the blueprints are offline.
User avatar
hansjoachim
Filter Inserter
Filter Inserter
Posts: 252
Joined: Wed Apr 26, 2017 7:03 pm
Contact:

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

Post by hansjoachim »

KuniXl wrote: Sat Dec 19, 2020 12:40 am Does anyone update the pastebins? e.g. 2-lane compact righthanddrive links to https://pastebin.com/5kxDRK9r :evil:
Most of the blueprints are offline.
I'll look into it
TreeFort96
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 27, 2020 4:37 am
Contact:

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

Post by TreeFort96 »

Does anyone have the blueprint strings for Wavy, Simple, and Adapted Wide?

Seems all of the blue print strings I looked at (5 or 6 of the 4 lane ones I was interested in using...) from the first page that go to pastebin do not exist anymore.

Thanks!
tsiebecker
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jan 11, 2021 8:00 am
Contact:

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

Post by tsiebecker »

foamy wrote: Fri Dec 04, 2020 6:50 am
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. (designed my own intersection, only reused the rail spacing).
You can, but not with RHD. Take mmmPI's layout, switch it to LHD, and you get full signalling.

Image
Made the Blueprint:


Kalanndok
Long Handed Inserter
Long Handed Inserter
Posts: 90
Joined: Sat Dec 12, 2015 9:07 am
Contact:

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

Post by Kalanndok »

On incoming line from the north there is a wrong rail signal.
Locked

Return to “Railway Setups”