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.
jaywalkerr
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Dec 03, 2018 7:36 pm

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

Post by jaywalkerr » Tue Dec 04, 2018 7:30 am

I'm sorry, I think I was a bit unclear. It's made to only use the square-roundabout if you actually make a U-turn. I downloaded the savegame and I can't really make any adjustments other than starting the trains. I'm really bad at circuits in general and mainly use blueprints that other people have made if I include them. I want it to be tested for deadlocks and throughput, and I would do it on my own if I could figure out how. Wich I can't.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2538
Joined: Tue May 13, 2014 11:06 am

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

Post by DaveMcW » Tue Dec 04, 2018 7:58 am

+1 for a save that is set up to test a 2 lane 4-way intersection.

User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 114
Joined: Sun Jun 14, 2015 8:14 am

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

Post by Tallinu » Tue Dec 04, 2018 2:21 pm

The save basically is set up for that already, at least when I downloaded it pretty recently.

You literally just connect your junction to however many lanes it needs (2 lane junction? Only connect 2 lanes), change the green signal to start the trains spawning, and after about 30 seconds of them making their way across the map, you rotate the inserter to restart the timers so you're getting an accurate measurement. Then you wait and watch the values displayed on the substation in the controls area.

I think the save does have a junction already placed when you download it, but that's easy to clear out with a deconstruction planner, as long as you have the creative mode mod installed with instant deconstruction turned on. You can then re-save the cleared map so it's easier to work with.

redeye_
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Dec 04, 2018 10:21 pm

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

Post by redeye_ » Wed Dec 05, 2018 2:38 am

Here's my new one: APCO (Asymmetric Priority Cross-Over)
https://pastebin.com/5JEbXhq7
Set 1: 87
Set 2: 83
There might be more room for improvement, I'm not sure

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2538
Joined: Tue May 13, 2014 11:06 am

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

Post by DaveMcW » Wed Dec 05, 2018 5:21 am

Ok, here is a saved 2-lane map.

Throughput tester 2-lane.zip
(2.96 MiB) Downloaded 2 times

User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 114
Joined: Sun Jun 14, 2015 8:14 am

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

Post by Tallinu » Wed Dec 05, 2018 9:54 am

DaveMcW wrote:
Wed Dec 05, 2018 5:21 am
Ok, here is a saved 2-lane map.


Throughput tester 2-lane.zip
That's certainly easier to clear out for a new test than the eight-laner on the original, but why did you find it necessary to clear the other lanes all the way back to the spawners? :lol: No harm in it if all you ever test is 2-lane stuff, but if that's true you probably aren't using even a quarter of the width/height of the test area anyway, so there's no real benefit to it either. *shrug* Still, it's probably less hassle for newcomers than the original contents of the map. :)
redeye_ wrote:
Wed Dec 05, 2018 2:38 am
Here's my new one: APCO (Asymmetric Priority Cross-Over)
https://pastebin.com/5JEbXhq7
Set 1: 87
Set 2: 83
There might be more room for improvement, I'm not sure
I got frequent flickering between 84-85 TPM, even by the 15 minute mark, from testing this as posted using P1 (with default 2-4-0 trains). Not sure why the difference but it seemed pretty stable in that range.

I like some of the details of this, although I did find one or two ways you could improve it. :) In particular, changing left turns into a kind of through traffic seems pretty effective. And I see that the north-south line is parallelized through the center crossing, although you didn't make that optimization along the east-west line. Three through-traffic lanes might be more than it needs (even in the north-south direction), and every lane that has to be merged back together is a potential increase in merge-related slowdowns, but I did see a number of times where buffering a couple of through-trains there allowed others to reach the turn lanes immediately when otherwise they would've had to wait for the second through train to move forward.

Now for a couple suggestions. I noticed that you have two merges happening directly after crossings, and sure enough, when I tried moving those farther away to allow trains to cross without sometimes being obstructed by right-turning traffic, it bumped the test result right up to a solid 87 TPM. Here's a section of blueprint for the east and west exit tracks demonstrating the change I tried:



In addition I can see two crossings that aren't necessary, and you might see another small improvement by uncrossing them, although it might take a little bit of fiddling with curved track positions. Specifically, the north- and southbound left turns (to exit east and west) cross over the tracks for the east- and westbound through traffic before both tracks cross through center and then merge together at the exit. Since they're just merging together to go the same direction, you don't need to mess with those outgoing tracks, only the crossing on the incoming side. Here's a picture:
UnCrossThis.png
UnCrossThis.png (225.97 KiB) Viewed 259 times
I don't know exactly how much that change would gain you, but unnecessary crossings like that did make a measurable impact on the performance of my MultiCross when I tried them out, so it's probably worthwhile to try it out.

Edit: Spoiler tags don't seem to be working in this post. I'm not sure if it's just a display issue on my end or what.

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

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

Post by hansjoachim » Wed Dec 05, 2018 11:06 am

Nice to see you active on the forum Tallinu!
I found your merge-o-matic in a blueprint book in the savefile. It is really nice!
I thought you would need a much longer buffer area to get it to work. I didn't realize that the acceleration isn't the bottleneck. It is also more compact then the merger I made. I noticed it bugs out sometimes and that it doesn't work for different car lengths. Is there an easy way to adjust it to different car lengths and different fuel?
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
My 3 to 1 train merger https://pastebin.com/AcLHXcwd

User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 114
Joined: Sun Jun 14, 2015 8:14 am

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

Post by Tallinu » Wed Dec 05, 2018 3:32 pm

I've been lurking and keeping an eye on developments here, but didn't really have anything to add and was busy with other things.

Thanks, but unfortunately one of the drawbacks of that system is that it has to be manually adjusted, pretty much by repeated testing, for trains of different lengths or acceleration profiles. On the other hand I did my best to make it resilient and capable of recovering gracefully from circumstances that cause too many trains to approach the intersection. Unless one is extremely short it should detect that more than one train is crossing a certain signal tripwire and stop sending more trains until all of the offenders have completely cleared the controlled merge area, for example. And in addition to the tripwire controlling when the next train is released, the following train's speed is limited by the short block signal pairs along the approach to the merge which are enabled by the controller only in appropriate lanes, although for high acceleration trains that isn't perfectly reliable either since their placement is fixed.

A more powerful method of controlling train start signal timing would be to somehow measure the speed and position of the trains in each lane and perform calculations to determine which would arrive first and predict when it will clear the merge point so that the next closest (or another stopped) train can be given a green signal at the right moment, taking into account its acceleration, to keep it from overshooting and having to brake. Unfortunately this would most likely be very complex to implement with combinators, and one of my goals was to minimize the added build cost of setting up combinator merge management.

It's probably possible to add a timing restriction to the requirements for sending the next train without too much additional circuitry, but it's not really something I'm pursuing.

All of this would be rendered moot if, as I've mentioned before, trains could have some prediction built-in (or modded in, but I'm not certain if it's possible to get the required information or limit a train's speed dynamically, as would be required).

immortal_sniper1
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Jun 03, 2018 8:54 am

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

Post by immortal_sniper1 » Wed Dec 05, 2018 11:10 pm

is there a BP book with all the junctions ( or a save of a map that has them) from here ??
also when was the top last updated?

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

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

Post by hansjoachim » Wed Dec 05, 2018 11:13 pm

The OP post have not been updated since January.
Many of them are in the savefile. The unoffical updated version of the testbench have also the intersections I made
Last edited by hansjoachim on Thu Dec 06, 2018 2:37 pm, edited 1 time in total.
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
My 3 to 1 train merger https://pastebin.com/AcLHXcwd

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

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

Post by hansjoachim » Thu Dec 06, 2018 11:25 am

Tallinu wrote:
Wed Dec 05, 2018 3:32 pm

A more powerful method of controlling train start signal timing would be to somehow measure the speed and position of the trains in each lane and perform calculations to determine which would arrive first and predict when it will clear the merge point so that the next closest (or another stopped) train can be given a green signal at the right moment, taking into account its acceleration, to keep it from overshooting and having to brake. Unfortunately this would most likely be very complex to implement with combinators, and one of my goals was to minimize the added build cost of setting up combinator merge management.
Making something like that would be really cool, but as you say it quickly becomes very complicated and doesn't give a significant throughput increase but would be more versatile to different train lengths and fuel type.
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
My 3 to 1 train merger https://pastebin.com/AcLHXcwd

NeuralParity
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Aug 12, 2017 6:30 am

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

Post by NeuralParity » Thu Dec 06, 2018 4:18 pm

I made a synchroton style intersection (essentially a roundabout that requires all trains on the roundabout to be travelling at 298.1km/h before they're allowed on it) with no rail crossings (just mergers) but the throughput (50 trains/minute) has been rather disappointing. I have an entry signal timing the trains onto the high-speed track so I know they're not going to crash but the yellow signals force my trains to space themselves apart due to their stopping distance. Since the stopping distance from full speed is so long, I end up with low utilisation on my main line thus poor throughput.

Is there any way to override train signals to force a (potentially dangerous) green signal?

https://factorioprints.com/view/-LT3GJXx3RK2L5RuR_ok

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

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

Post by hansjoachim » Thu Dec 06, 2018 4:34 pm

NeuralParity wrote:
Thu Dec 06, 2018 4:18 pm

Is there any way to override train signals to force a (potentially dangerous) green signal?

https://factorioprints.com/view/-LT3GJXx3RK2L5RuR_ok
No, you can only force a red signal.
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
My 3 to 1 train merger https://pastebin.com/AcLHXcwd

immortal_sniper1
Fast Inserter
Fast Inserter
Posts: 183
Joined: Sun Jun 03, 2018 8:54 am

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

Post by immortal_sniper1 » Thu Dec 06, 2018 8:58 pm

https://pastebin.com/2A7Whfxf

rotarionary symetrical 4 lane x jounction RHD inspired by some designs from here that were LHD that i converted to [rhd and 1-3-1 spacing]
and did some adjusting

could you please test this one??

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

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

Post by hansjoachim » Thu Dec 06, 2018 9:00 pm

immortal_sniper1 wrote:
Thu Dec 06, 2018 8:58 pm
https://pastebin.com/2A7Whfxf

rotarionary symetrical 4 lane x jounction RHD inspired by some designs from here that were LHD that i converted to [rhd and 1-3-1 spacing]
and did some adjusting

could you please test this one??
Nice, I'll can look at it tomorrow
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
My 3 to 1 train merger https://pastebin.com/AcLHXcwd

NeuralParity
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Aug 12, 2017 6:30 am

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

Post by NeuralParity » Thu Dec 06, 2018 9:05 pm

hansjoachim wrote:
Thu Dec 06, 2018 4:34 pm
NeuralParity wrote:
Thu Dec 06, 2018 4:18 pm

Is there any way to override train signals to force a (potentially dangerous) green signal?
No, you can only force a red signal.
So the moment an automatic train crosses even just one signal it'll never collide with another train? It's a bit disappointing that we don't even have the opportunity to shoot ourselves in the foot. There's no way to force a transition out of the signal-based world without having an entirely different rail network is there?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 2538
Joined: Tue May 13, 2014 11:06 am

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

Post by DaveMcW » Thu Dec 06, 2018 9:35 pm

It is fairly easy for a mod to force a signal open by simply deleting and rebuiling it.

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

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

Post by hansjoachim » Thu Dec 06, 2018 9:38 pm

There are some scenarios where you can get trains to crash, I'm unsure how to replicate it, but I have seen it happen when I force a light to be red.
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
My 3 to 1 train merger https://pastebin.com/AcLHXcwd

User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 114
Joined: Sun Jun 14, 2015 8:14 am

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

Post by Tallinu » Fri Dec 07, 2018 11:03 am

The worst I've seen happen is for a train that was approaching the forced signal to instantaneously stop or slow until its braking distance doesn't enter the now closed block that it was approaching. But even if another train is following that one, because trains are not allowed to tailgate each other, the next train stops normally before entering the block(s) which the suddenly stopped train occupies. If a forced signal causes any trains to crash, that probably constitutes a bug.

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

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

Post by mrvn » Fri Dec 07, 2018 11:51 am

And wouldn't it be better for there to be actual u-turn loops on every entry that doesn't cross the rest of the junction?

Post Reply

Return to “Railway Setups”