4-way intersections: Throughput and deadlocks [image heavy]
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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:
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.
As case in point, I'd like to highlight ye olde roundabout, which is now immune to deadlocks from repathing:
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.
Re: 4-way intersections: Throughput and deadlocks [image heavy]
I ran Rail bridge interchange with no shared track (rail bridges mod) through throughput testing, and here's a summary of the results:
- Equal: 46 TPM
- Planned RHD: 48 TPM
- Planned LHD: 47 TPM
- Left Only: 66 TPM
- Right Only: 75 TPM
- U-Turn and Lane Switch: N/A
- 3 Way Equal: N/A
- : N/A
- Left Only Nuclear: 79 TPM
- Equal Nuclear: 55 TPM
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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
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 (2.12 MiB) Viewed 9535 times
i made dis:
45sps/2700spm Science Book
The Refinery
Tileable Kovarex
Circuit Book - G/R/B circuit production
The Smelter
45sps/2700spm Science Book
The Refinery
Tileable Kovarex
Circuit Book - G/R/B circuit production
The Smelter
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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
When you say you, do you mean aaargha? Because he hasn't tested anything in awhile.
I'll take a look at it
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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
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
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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
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 (231.13 KiB) Viewed 9296 times
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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:
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 (21.72 KiB) Viewed 9190 times
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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.
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.
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Hey with your test setup I was able to make it run
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
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?
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
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?
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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.
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
- 20191201_005434.jpg (342.79 KiB) Viewed 9144 times
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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.
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.
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.
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.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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.
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 (902.16 KiB) Viewed 9045 times
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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?
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.
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?
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.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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?
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.
Re: 4-way intersections: Throughput and deadlocks [image heavy]
I will look at the signals tomorrow then. Thanks.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Here are the missing signals on the other intersection
Edit: Was missing another signal, updated the picture
Edit: Was missing another signal, updated the picture
- Attachments
-
- Intersection 123.png (266.1 KiB) Viewed 8936 times
Re: 4-way intersections: Throughput and deadlocks [image heavy]
Whats the best method/layout for a transtion between a 2 lane system and a 4 lane?
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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.
Re: 4-way intersections: Throughput and deadlocks [image heavy]
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!
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:
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 ....
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
- - 2 lanes with buffers
- 2 lanes without buffers
- 4 lanes with buffers
- 4 lanes without buffers
- - 2 lanes with buffers
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 ....
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 4-way intersections: Throughput and deadlocks [image heavy]
The intersections in the OP are solid. However there are intersections with higher throughput. I have posted multiple in this forum.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!
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:Can I rely on blueprints in OP or new solutions are available ?
- - 4-way intersection:
- 3-way intersection:
- - 2 lanes with buffers
- 2 lanes without buffers
- 4 lanes with buffers
- 4 lanes without buffers
- - 2 lanes with buffers
- 2 lanes without buffers
- 4 lanes with buffers
- 4 lanes without buffers
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 ....
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.