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.
Locked
Theikkru
Filter Inserter
Filter Inserter
Posts: 353
Joined: Wed Mar 27, 2019 2:18 pm
Contact:

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

Post by Theikkru »

As of 0.17.50 I've finished prodding kovarex about the bugs in the 0.17.38 update, so the new, improved behavior regarding trains repathing in chain signals should work properly now. This has widespread implications for rail system designs in general, makes a lot of intersections work more efficiently, and should upgrade a lot of deadlock ratings to A.
As case in point, I'd like to highlight ye olde roundabout, which is now immune to deadlocks from repathing:
olde.png
olde.png (259.07 KiB) Viewed 9145 times

Self-crashes will still occur if the roundabout is shorter than a train, but trains repathing within will now get out of the intersection instead of stopping in the middle to wait for a way out.

I think the testbenches may need some tweaking to account for this behavior though, since it relies on the presence of alternate paths to shunt trains out of chain blocks if they try to repath in them. In-game, station loops and other intersections/turnarounds would provide this function, but the testbenches only provide terminal entries and exits, so trains trying to repath will throw "No path" errors and sit down in the intersection if they can't find a valid route out of the chain block.

In other news, RIP curved track train phasing bug and associated maximum throughput intersections.

User avatar
mrudat
Fast Inserter
Fast Inserter
Posts: 222
Joined: Fri Feb 16, 2018 5:21 am
Contact:

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

Post by mrudat »

I ran Rail bridge interchange with no shared track (rail bridges mod) through throughput testing, and here's a summary of the results:
  1. Equal: 46 TPM
  2. Planned RHD: 48 TPM
  3. Planned LHD: 47 TPM
  4. Left Only: 66 TPM
  5. Right Only: 75 TPM
  6. U-Turn and Lane Switch: N/A
  7. 3 Way Equal: N/A
  8. : N/A
  9. Left Only Nuclear: 79 TPM
  10. Equal Nuclear: 55 TPM
I'm not certain that I got the setup right, given the tracks didn't quite line up. For best results, should I have as much straight track connected to the crossing, and correct misalignment closest to where the trains spawn?

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

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

Post by ranzolger »

i've reworked the 'Alternating Cross' (already testet) and made a (hopefully) better version.
its powerpole alinged, 6car, and LHD

may i ask you to run a test on it? for everyone else its a potent 4lane x-junction ;)



or pastebin

thanks in advance
Attachments
Alternating Cross V2.png
Alternating Cross V2.png (2.12 MiB) Viewed 8268 times

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

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

Post by hansjoachim »

Nice nice! Good to see a post=)
When you say you, do you mean aaargha? Because he hasn't tested anything in awhile.
I'll take a look at it

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

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

Post by hansjoachim »

Thanks for your submission!
set 1 = 93
set 3 = 85
I like the improvement, you pull some of the intersecting lanes away from the center.
That would put your intersection fourth on the list for 4 lanes 4 way intersections.

You can part this intersection into two sections. The section where trains picks lane and the big crossing section. The section where trains pick lanes have the biggest potensial. If you split that up with buffers you can increase throughput.
Max throughput of an 4 way intersection with 6 cars is ~260 with 4 lanes and ~130 with 2 lanes. So there is still a lot of headroom.
The test where most intersection on this page struggle is "right only" for LHD and "left only" for RHD where the potensial is still 260.
Here your intersection scores
set 5 = 70

Zaflis
Filter Inserter
Filter Inserter
Posts: 414
Joined: Sun Apr 24, 2016 12:51 am
Contact:

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

Post by Zaflis »

I made some improvements to 2-lane, A, Compact, RHD blueprint.
It wasn't rotationally symmetric and it could be squeezed a little smaller still.

edit: Oops, 1 rail signal at the end is too much.. lemme fix that in a bit...
Done.

https://pastebin.com/eS5sjrtd
Attachments
compact-rhd.jpg
compact-rhd.jpg (231.13 KiB) Viewed 8029 times

kolumdium
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 30, 2019 2:07 pm
Contact:

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

Post by kolumdium »

Hey I really like this post!

I tried to make the throughput tester work but for some reason it didn't work.
I made my own setup for testing but it doesn't count trains.

Could you run a Benchamark on this first Version of my Intersection?
It's big but good to combine with solar. (And works best with Krastorio and Bioindustries) but the functionality doesn't change.
Maybe you could make a better screenshot of it as well.

Edit alreaddy had to change the Blueprint string because it was missing some signals.

new:





old:
Attachments
Screenshot 2019-11-30 15.12.26.png
Screenshot 2019-11-30 15.12.26.png (21.72 KiB) Viewed 7923 times

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

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

Post by hansjoachim »

Hey!
I'll check it thoroughly when I am back home in q couple days.
You can try my version of the testbench which is easier to use.
The first thing I see that drastically cuts throughput is that the inner lane has to change lane twice to go either right or left.
Secondly left turns for the innerlane are going right before going left, which means that it's blocks innerlane straight going trains unnecessary.
Thirdly, left turning lanes are crossing eachother unnecessary.

I might have misunderstood it since I haven't seen it in game yet, please point it out if I understood something wrong.
Last edited by hansjoachim on Sat Nov 30, 2019 11:37 pm, edited 1 time in total.

kolumdium
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 30, 2019 2:07 pm
Contact:

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

Post by kolumdium »

Hey with your test setup I was able to make it run :D
Thanks alot.
It had 160 ish Trains in 2 min.

Your Tipps are helpfull and confusing at the same time.
Because it sounds like I should make an intersection, without anything intersecting :D
But I am going to work on the intersection.

The Idea behind it at the start was that there is as few lines crossing as possible. And if there is there is a "buffer" train. Thus if one direction clears some trains at once can pass.

Also Isn't left going trains not intersecting a weird test case? Because you will never have only left going train (ideally) and i think a good setup for good right and left flow will be worse at all direction passing. But then again I am new to Intersections.

Also I don't know how you would make straight going trains not intersect. The Lines have to cross at somepoint or am I wrong?

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

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

Post by hansjoachim »

Good that you got it to run!
I wrote wrong I meant opposing trains. Like opposing straight going trains shouldn't cross eachothers path or opposing left going trains. People really only do that mistake with left going trains.
Attachments
Those paths doesnt need to intersect
Those paths doesnt need to intersect
20191201_005434.jpg (342.79 KiB) Viewed 7877 times

kolumdium
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 30, 2019 2:07 pm
Contact:

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

Post by kolumdium »

Yeah I Understood that now. Fiddle with it some more.
Made a Left-Hand path.
Got the throughput up by 15 per minute.




I also tried a smaller one where I incorporate what you said.
But it was way worse. I obviously don't know what i am doing yet. :D

I had to many more crossings in that one.

This is fun though. Designing these.
Gonna do some more next week.


PS: I also just noticed you guys test with 2-4 trains. I did it for 1-4.
May change my setup though.

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

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

Post by hansjoachim »

Hey I looked at the compact one. You miss a couple signals. That is why it performes poorly. You can also replace the chainsignales marked with x with normal signal and remove the ones marked with a red X. This cropped area is the most loaded and the bottleneck in your intersection. Having the U-turn in this area limit its throughput. I would recommend making seperate U-turn intersections in your system, ideally with buffers.
If you want to further increase throughput you need to space this area out.
If you don't want to space it out you can comprese it way more when you have removed the U-turn.
Attachments
Intersection.png
Intersection.png (902.16 KiB) Viewed 7778 times

kolumdium
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 30, 2019 2:07 pm
Contact:

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

Post by kolumdium »

Hey Thanks again for taking a look.

Does it make a difference if I have the once marked with an x to be regular or chain signal?

The once marked with a red dot I indeed missed. The once on the bottom right are important, I see that.
However the missing signal in the upper part of the loop wouldn't change anything would it?

Also I didn't want to compact it as I wanted this one to be a buffered Intersection.
Additionally I wanted a Train to go in any direction, that is why I had the u-turn in it. The Train also should only have exactly one path to get to it's desired exit.
I tried to avoid loops, like two right to go straight or three right to go left.
I understand that the u-turn makes it slower. I just kind of want it in, you know? :D

Did you have a chance to look at the newer bigger one as well? I really like that one now.


EDIT:
I don't think i can replace the chain signals. It could happen that if they were normal signals, that a train stops there and blocks other trains.

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

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

Post by hansjoachim »

kolumdium wrote:
Wed Dec 04, 2019 7:46 pm
Hey Thanks again for taking a look.

Does it make a difference if I have the once marked with an x to be regular or chain signal?

If they are chain signals trains have to wait longer for their turn. It doesn't have a huge impact but a little. The red x ones you can remove.


However the missing signal in the upper part of the loop wouldn't change anything would it?

If two trains drives parallel north to south they have to wait for eachother passing that area without a signal there. That goes for all straight going trains. Missing that signal has a huge throughput impact

I understand that the u-turn makes it slower. I just kind of want it in, you know? :D

If you really want it in and you actually have many trains that plan on taking U turns you should add some buffers to increase throughput


Did you have a chance to look at the newer bigger one as well? I really like that one now.


I did look at it, it also misses some signals. Exactly by the U-turn. If you don't find it I can look at it another time.

Sorry, for the shitty formating, I wrote this on my phone.

kolumdium
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 30, 2019 2:07 pm
Contact:

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

Post by kolumdium »

I will look at the signals tomorrow then. Thanks.

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

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

Post by hansjoachim »

Here are the missing signals on the other intersection
Edit: Was missing another signal, updated the picture
Attachments
Intersection 123.png
Intersection 123.png (266.1 KiB) Viewed 7669 times

ionicbox
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Jun 07, 2019 12:50 pm
Contact:

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

Post by ionicbox »

Whats the best method/layout for a transtion between a 2 lane system and a 4 lane?

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

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

Post by hansjoachim »

ionicbox wrote:
Sun Feb 02, 2020 12:50 pm
Whats the best method/layout for a transtion between a 2 lane system and a 4 lane?
What do you mean? As a three-way intersection, four-way? Or just how to transition on a straight line?
Regardless, the highest throughput way is to:
- Keep all intersections like normal 4 lane intersections on your mainlines.
- merge the lanes at least one train length away from any intersection.

This way you have a buffer for your trains and you don't merge them in the intersection, which lowers the intersections potential throughput.
Also, you get higher throughput overall since you have more lanes in and out from the 2 lane section.

You can ofc design some custom intersections for this to save some rails and making it look more pretty.

linkined
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Mar 09, 2020 12:22 pm
Contact:

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

Post by linkined »

Is this/OP post still up-to-date ? I spent a good time on this post and it seems there is some updates in comments but 31 pages later and I'm lost! :D
Is there another post with the actual state of art of intersection in factorio ? (This post seems to be the ONE when you search in the forum)
I'm looking for:
  • - 4-way intersection:
    • - 2 lanes with buffers
      - 2 lanes without buffers
      - 4 lanes with buffers
      - 4 lanes without buffers
    - 3-way intersection:
    • - 2 lanes with buffers
      - 2 lanes without buffers
      - 4 lanes with buffers
      - 4 lanes without buffers
Can I rely on blueprints in OP or new solutions are available ?
These intersections will be used in a "city block" map.
Should I focus on compactness or throughput first ?
So many questions and so many intersections .... :shock:

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

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

Post by hansjoachim »

linkined wrote:
Mon Mar 09, 2020 12:36 pm
Is this/OP post still up-to-date ? I spent a good time on this post and it seems there is some updates in comments but 31 pages later and I'm lost! :D
Is there another post with the actual state of art of intersection in factorio ? (This post seems to be the ONE when you search in the forum)
I'm looking for:
  • - 4-way intersection:
    • - 2 lanes with buffers
      - 2 lanes without buffers
      - 4 lanes with buffers
      - 4 lanes without buffers
    - 3-way intersection:
    • - 2 lanes with buffers
      - 2 lanes without buffers
      - 4 lanes with buffers
      - 4 lanes without buffers
Can I rely on blueprints in OP or new solutions are available ?
These intersections will be used in a "city block" map.
Should I focus on compactness or throughput first ?
So many questions and so many intersections .... :shock:
The intersections in the OP are solid. However there are intersections with higher throughput. I have posted multiple in this forum.
Depending on how long your trains are and how much ressources you plan to put on trains you might not need high throughput intersections.
Most intersections in your base should be basic ones, but areas with high loads need high throughput intersections.
If you want a type of highway you might want to make highway rules. Like all intersections on a highway are high throughput ones and you try to merge as many lanes as reasonable possible before they get to enter the highway.
Regarding 4 lanes.
2 lanes with high throughput intersections has a really high throughput, about 33 per lane with 2-6, while 4 lane with no buffer intersections with many crossing gets about 7 trains per min per lane.
Unless you have really long trains I would recommend 2 lanes with buffered intersections over 4 lanes with unbuffered intersections.

Compactness vs throughput.
Check how large the buffered intersections are and leave room for them, then use unbuffered intersections until you need higher throughput.

Locked

Return to “Railway Setups”