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.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

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

Post by aaargha »

@ridesdragons: I'll get back to you tomorrow as I don't have time to test that one right now. From the looks of it it should behave mostly like the D rated roundabout except that yours will possibly have a bit lower throughput as the straight paths intersect for opposing trains, though that might be compensated by the left turns not intersecting, we'll see.

@Tallinu: I've included a blueprint for the endpoints with instant stop stations below. The idea is that you have a signal closely followed by a train stop, this stop is only enabled when the signal is red. Further down the line you have another train stop with the same name that is enabled when the signal is not red. What happens is that trains path to the far away one but change to the close one just as they get to it, placing them almost instantly at the train stop.

When I first applied this it tanked my UPS from 160-180 to about 90-120 on the 4-lane multi-cross. Interestingly enough what took more time was not the train pathfinding, that increase was very small, but the electrical network! The blueprint contains 48 super power poles for each of the 4 endpoints it became a mess of cables when I placed it, as I didn't need the power for anything I disconnected all the poles from the electrical grid. That turned out to be a mistake, I had just created 192 additional electrical networks, adding about 0.6ms of additional processing time each frame, fixing that has to be among the stupidest performance optimizations I've ever done. Learn from this kids, keep your power poles connected :) It's still a slight UPS hit but not nearly as much.

Great work on the improved spawner, I'll have to implement something like that to get better accuracy on the really high performance intersections.
Instant stop end points
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 »

Hey, i have improved the intersection and it should perform over 350 trains per min in set 1
The blueprint is set with less throughput as it should be if you don't have over 300 trains per min. If you want max throughput set a=7. Please also empty the intersection before testing or changing test

It should be deadlock proof with every type of traffic, unless you intentionally deadlock it or remove wires. Would be great if you aaarghas could deadlock test it.

The savefile is added as the intersection is larger than the given space.
Hans v3
https://pastebin.com/LUhZNxwA
Attachments
aaarghas - Hans v 3.zip
(14.96 MiB) Downloaded 201 times
User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 142
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

Post by Tallinu »

Hans, I pasted in that blueprint about five minutes ago, and as I edit this note in, Factorio is still frozen. But I could see just from waving the blueprint around that you have way, way too many signals on your straight lengths of track. How many thousands of unnecessary blocks is that? :lol:

-- Okay, a couple minutes later it finally unfroze. What's with all the train stops in the blueprint? It doesn't record their names, so I have just randomly selected backer names on the stops next to all of these combinators and stuff. Also, the south entrance/exit is horribly misaligned, I had to blueprint a copy of the east end (which matched the correct track alignments) and replace it with that (edited the signal controls to read "S" -- speaking of signal controls, the black signal: why do you even have a way to to lock all the exits??)

Aaand I get 28 UPS with this thing running. :lol:
aaargha wrote:The idea is that you have a signal closely followed by a train stop, this stop is only enabled when the signal is red. Further down the line you have another train stop with the same name that is enabled when the signal is not red. What happens is that trains path to the far away one but change to the close one just as they get to it, placing them almost instantly at the train stop.
Well, keep in mind that even on the normal deleter, every single train that enters it (in close succession) will change paths to the closest free station (although it seems to care more about the distance to the signal for the block containing the station than the actual distance to the station, since certain track/signal patterns at the branches will result in trains preferring station 2 over station 1, or station 4 over 3, for example.) I have a feeling this occurs when it attempts to reserve the block it originally pathed to and finds it red. But by the time it's that close to the stations there's not a lot of track left to pathfind through. This part probably still happens on the instant-stop stations, so it's likely an additional quick pathfinding with only one possible outcome on top of that. On the other hand, all those stations switching on and off could cause repathing in trains that aren't anywhere near the stops. Would it still work if you left the last station enabled but blocked it off by closing a signal placed after the closer one at the same time as you enabled that closer station?

Also, how are you getting more than 60 UPS??? My system won't even run at 60 when there are a million trains on the map, but I'd still like to know how you get it to run even faster! :lol:

aaargha wrote:Great work on the improved spawner, I'll have to implement something like that to get better accuracy on the really high performance intersections.
Thanks. I've made some more changes to it, I'll go ahead and post it now that I'm pretty satisfied with how it works, and the big deletion areas that don't require your instant-stopping stations to keep things moving quickly.

Blueprint String: https://pastebin.com/R5nLFGTL
Screenshot
Map View
Oh yeah, in the process of all this I discovered that the east and south spawners were both at different distances from the center compared to the north and west. Since the latter two were both a nice round 300 track tiles from the center to the last usable tile before where I'd relocated the counters to, and I was basically redoing each station from scratch anyway, I adjusted their positions and expanded the grey tiled area to an even "radius" of 250 for an area of 501x501 track tiles, with the distance between opposite stations being 601 tracks, leaving room for some track adapters outside the grey area. And I added some measuring concrete to help with finding corners and such. :D

Also, no matter how I tweak the timings in attempts to alter the train spacing (and speed), eight spawners worth of 2-4-0 traffic always seems to cap out at a little over 260 TPM (262-263ish usually). I suspect this is just hitting the maximum throughput per track -- the faster they go, the more space they take, so the fewer trains fit; the less space they can claim, the more trains fit, but the slower they go. I have a feeling it's one of those self-stabilizing systems, and 262ish is the point where speed vs length balances out for that size of train. Probably the distance reserved is based on stopping distance and they're using constant deceleration, like Zavian suggested, making it the square of the speed. (At least, when the trains aren't glitching out and stopping instantly due to circuit networks closing signals on them!)
Last edited by Tallinu on Wed Aug 09, 2017 7:52 pm, edited 1 time in total.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

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

Post by aaargha »

ridesdragons wrote:I'm guessing anything you've tested/looked at is in the OP? anyway, I made a design a ways back that as far as I can see works fine, though I guess with pathing bugs that could change things. think you could rate/test my intersection? it's a 2-lane roundabout.

also, my roundabout design was made quite a while ago. as far as I can see, it works identical to one that uses proper signalling habits, but just in case, I remade it with proper signalling habits. sorry they're right-handed. neither of them utilize a buffer. either you pass through or you wait at the entrance.
Added as "reversed roundabout", turns out that it performs pretty similar to the regular roundabout, at least for my test cases.
hansjoachim wrote:Hey, i have improved the intersection and it should perform over 350 trains per min in set 1
The blueprint is set with less throughput as it should be if you don't have over 300 trains per min. If you want max throughput set a=7. Please also empty the intersection before testing or changing test

It should be deadlock proof with every type of traffic, unless you intentionally deadlock it or remove wires. Would be great if you aaarghas could deadlock test it.
I'll admit that I'm not really sold on the safety measures, they feels a bit like "fair weather deadlock safety", trains can still stop in the middle of the intersection if an output gets backed up, which, to be fair, is unlikely given the humongous buffers. If you'd run shorter trains than 6-car the deadlock prevention feature (closing the entire intersection) may not even trigger properly. If something happens that temporarily blocks one output this design will quickly spread that congestion to all the inputs as none of them will be allowed to progress in any way. I'm probably a bit pessimistic here, but to me it feels like this type of system will work great until something goes wrong, at which point it is unlikely to recover gracefully as one intersection shutting down will make its neighbours more likely to do the same.

As long as the traffic does not back up it probably won't deadlock, but it's always a bit hard to tell with circuits. That said, it has a lot of potential once its made more robust, the current buffer size requirements are just silly, but I can't really get behind it in its current state.
Tallinu wrote:Well, keep in mind that even on the normal deleter, every single train that enters it (in close succession) will change paths to the closest free station (although it seems to care more about the distance to the signal for the block containing the station than the actual distance to the station, since certain track/signal patterns at the branches will result in trains preferring station 2 over station 1, or station 4 over 3, for example.) I have a feeling this occurs when it attempts to reserve the block it originally pathed to and finds it red. But by the time it's that close to the stations there's not a lot of track left to pathfind through. This part probably still happens on the instant-stop stations, so it's likely an additional quick pathfinding with only one possible outcome on top of that. On the other hand, all those stations switching on and off could cause repathing in trains that aren't anywhere near the stops. Would it still work if you left the last station enabled but blocked it off by closing a signal placed after the closer one at the same time as you enabled that closer station?
The path changing does not seem to cause any issues and I don't think leaving the last station enabled but blocked will improve things, it feels like the trains will either keep pretty much the same behaviour or it will break the system. I'll take a look as it might save some time on the pathfinder, but there isn't really that much to gain there IIRC.
Tallinu wrote:Also, how are you getting more than 60 UPS??? My system won't even run at 60 when there are a million trains on the map, but I'd still like to know how you get it to run even faster! :lol:
I think it's mostly because I did some cleaning :D Or my old i7 950 is being unusually competitive. I've attached my current version of the test map in the OP, if you want to do a comparison I'm getting about 65-85 UPS on the 8-lane multi-cross that is slotted in.

I'll also probably take a look at Creative mode to see if there is any low hanging UPS fruit, it uses a lot of computing time even though it has basically nothing to do.
Tallinu wrote:Also, no matter how I tweak the timings in attempts to alter the train spacing (and speed), eight spawners worth of 2-4-0 traffic always seems to cap out at a little over 260 TPM (262-263ish usually). I suspect this is just hitting the maximum throughput per track -- the faster they go, the more space they take, so the fewer trains fit; the less space they can claim, the more trains fit, but the slower they go. I have a feeling it's one of those self-stabilizing systems, and 262ish is the point where speed vs length balances out for that size of train. Probably the distance reserved is based on stopping distance and they're using constant deceleration, like Zavian suggested, making it the square of the speed. (At least, when the trains aren't glitching out and stopping instantly due to circuit networks closing signals on them!)
This sound pretty likely, at max speed a 2-4 it takes 124 ticks from the front of one train to the front of the next one when using a block length of one car, like we do. That would give a throughput of 29.03, unless I've totally messed up my measurements, which would mean that in this case maximum throughput is at just under max speed?
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

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

Post by impetus maximus »

people who are just going for high throughput numbers with 8 lanes etc.
would like to see one being utilized in a real save, not just a test bed.
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 »

aaargha wrote:I'll admit that I'm not really sold on the safety measures, they feels a bit like "fair weather deadlock safety", trains can still stop in the middle of the intersection if an output gets backed up, which, to be fair, is unlikely given the humongous buffers. If you'd run shorter trains than 6-car the deadlock prevention feature (closing the entire intersection) may not even trigger properly. If something happens that temporarily blocks one output this design will quickly spread that congestion to all the inputs as none of them will be allowed to progress in any way. I'm probably a bit pessimistic here, but to me it feels like this type of system will work great until something goes wrong, at which point it is unlikely to recover gracefully as one intersection shutting down will make its neighbours more likely to do the same.

As long as the traffic does not back up it probably won't deadlock, but it's always a bit hard to tell with circuits. That said, it has a lot of potential once its made more robust, the current buffer size requirements are just silly, but I can't really get behind it in its current state.
If a train sticks out into the intersection and block a train in the next round, that train will trip the deadlock safety
User avatar
TRUEpicness
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Wed Aug 09, 2017 8:21 pm
Contact:

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

Post by TRUEpicness »

i use the 4 lane wavy intersection

this page is so useful and it is really interesting to see what others have made
1 more YouTube vid before bed *starts 24hr long vid*
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 »

Tallinu
I used the black signal to check for deadlock, and to see where a filled lane would end up in the senter. I thought that the names would carry over:/
Yeah you could probably remove half or 2/3 of the signals and get the same throughput
BTW I am pretty sure the multicross would get a higher throughput with more signals.
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 »

hansjoachim wrote:A high throughput 8 way intersection
It works like a 8 way road intersection, and i have no chain signals in the senter.
I use circuit networks to manage signals
You missed one. There is a chain signal in the middle.
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 »

lee1026 wrote:I built this intersection to be as low cost and easy to hand build as possible. It is cheap, especially in terms of signals, but does it perform well?

Image

https://pastebin.com/GKy2jG0y
That looks horrible. Only one train can ever be on the cross. Would be simpler if you keep 2 tracks and just don't put any signals in the middle. Or a roundabout with no signals in the middle.
User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 142
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

Post by Tallinu »

hansjoachim wrote:Tallinu
I used the black signal to check for deadlock, and to see where a filled lane would end up in the senter. I thought that the names would carry over:/
Yeah you could probably remove half or 2/3 of the signals and get the same throughput
BTW I am pretty sure the multicross would get a higher throughput with more signals.
I see, the black signal makes sense now.

And having a signal on every single track tile, or even every two or three tracks, is just going to tank your performance for no significant benefit -- refer back to the UPS I said I was getting with your latest version running. Everything else I've made or tried ran way better, typically in the 50-60 UPS range rather than sub-30, and the circuit isn't nearly complex enough to explain it... The only difference between that one and many others is the overwhelming number of signals. Trying to squeeze out an extra couple points of TPM by spamming signals everywhere like that is really not worth making the game run like molasses.

And if nothing else you at least have to make your chain signal exit blocks be long enough to fit your longest train inside so that the intersections won't get blocked, otherwise the chain signals are pretty worthless. Blocked intersections, even if they don't cause a deadlock, can cause significant slowdown, turning a backup in one lane into a backup in potentially many other lanes. You've partially worked around that by just having such an incredibly large buffer area that the chain signaled intersections don't get blocked until there's so many trains buffered that it won't matter until the buffer starts emptying, and at that point any blockages should clear up, but it's still not best practice.

Besides, I think train acceleration and intersection blocking time have a far greater effect on throughput than squeezing trains one or two train tracks closer together by reducing block size would, especially considering the recent discussion regarding the amount of track they reserve for stopping distance (which it turns out there's a really nice UI element for in debug settings, F4 -- you can easily see when a train is blocked and slowing down, because the circle stops moving).
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 »

Tallinu wrote:
hansjoachim wrote: Besides, I think train acceleration and intersection blocking time have a far greater effect on throughput than squeezing trains one or two train tracks closer together by reducing block size would, especially considering the recent discussion regarding the amount of track they reserve for stopping distance (which it turns out there's a really nice UI element for in debug settings, F4 -- you can easily see when a train is blocked and slowing down, because the circle stops moving).
This makes me wonder. I've always sized my buffers to the length of the train. But then, if they need the buffer that means they will break before they are in the buffer and block the previous block longer than necessary. I wonder if buffers should be longer than the train so the train can drive full speed into the buffer and break inside. That way it wouldn't slow down the train behind it that doesn't need to wait or uses a different buffer.
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 »

Tallinu wrote: And having a signal on every single track tile, or even every two or three tracks, is just going to tank your performance for no significant benefit -- refer back to the UPS I said I was getting with your latest version running. Everything else I've made or tried ran way better, typically in the 50-60 UPS range rather than sub-30, and the circuit isn't nearly complex enough to explain it... The only difference between that one and many others is the overwhelming number of signals. Trying to squeeze out an extra couple points of TPM by spamming signals everywhere like that is really not worth making the game run like molasses.

And if nothing else you at least have to make your chain signal exit blocks be long enough to fit your longest train inside so that the intersections won't get blocked, otherwise the chain signals are pretty worthless. Blocked intersections, even if they don't cause a deadlock, can cause significant slowdown, turning a backup in one lane into a backup in potentially many other lanes. You've partially worked around that by just having such an incredibly large buffer area that the chain signaled intersections don't get blocked until there's so many trains buffered that it won't matter until the buffer starts emptying, and at that point any blockages should clear up, but it's still not best practice.

Besides, I think train acceleration and intersection blocking time have a far greater effect on throughput than squeezing trains one or two train tracks closer together by reducing block size would, especially considering the recent discussion regarding the amount of track they reserve for stopping distance (which it turns out there's a really nice UI element for in debug settings, F4 -- you can easily see when a train is blocked and slowing down, because the circle stops moving).
Yeah, i should remove signals. I didn't think about UPS. The intersection would never be used if players can't use it due to UPS problems. Thanks=)

It is not a problem that the throughput is limited when, and after, an output lane is blocked. Because in a good train network that would not regularly happen.
It only has to prevent deadlock and eventually get up to full speed again.

The only time i have experienced blocked lanes is if trains are out of fuel, I have built too small buffers for trains stations or I have low throughput intersections.
User avatar
Tallinu
Fast Inserter
Fast Inserter
Posts: 142
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

Post by Tallinu »

mrvn wrote:
Tallinu wrote: Besides, I think train acceleration and intersection blocking time have a far greater effect on throughput than squeezing trains one or two train tracks closer together by reducing block size would, especially considering the recent discussion regarding the amount of track they reserve for stopping distance (which it turns out there's a really nice UI element for in debug settings, F4 -- you can easily see when a train is blocked and slowing down, because the circle stops moving).
This makes me wonder. I've always sized my buffers to the length of the train. But then, if they need the buffer that means they will break before they are in the buffer and block the previous block longer than necessary. I wonder if buffers should be longer than the train so the train can drive full speed into the buffer and break inside. That way it wouldn't slow down the train behind it that doesn't need to wait or uses a different buffer.
That's actually something I've noticed too, in places where junctions have larger stretches of buffer than necessary, and it seems like could be very helpful if you have the room to leave extra space. While the first block after the chain signal should still be as close as possible to one train in length, there's nothing preventing you from having additional space after that which a train will move into, partially clearing the large block. It will block the chain signals for a shorter time due to moving faster, and it will free up their exit block sooner when it is able to start moving again due to less of it occupying that exit block when it begins moving.

I should run some more intersection time tests with another closed signal after the intersection, positioned so that the tail of the train will stop at various distances from the intersection being monitored, and see how noticeable the results are...

---

And I'm back! (From outer space!)

Previous results from continuously accelerating trains (time the intersection is blocked, in game ticks, as measured by combinator):
2-4-0: 148
1-4-0: 173
4-8-0: 206
2-4-2: 211
4-10-0: 238
3-8-3: 296

Results when a train has to stop a certain distance after the test intersection:
2-4-0, track length 21, best time 148
21 tracks before the red signal: 167
22: 159
23: 155
24: 152
25: 151
26: 150
27: 149
28: 148 (7 additional track tiles, about two car lengths)

4-10-0, track length 49, best time 238
49: 272
50: 263
51: 257
52: 254
53: 251
54: 248
55: 246
56: 245
57: 243
58: 242
59: 241
60: 241
61: 240
62: 239
63: 239
64: 239
65: 238 (16 additional track tiles, just over four car lengths)

So it seems like even adding a few extra tracks to that minimum length can grant a significant reduction in the additional time the intersection is blocked. The improvement per track added goes down on a curve as the length increases, and eventually levels off at the minimum time.

Test rig expanded to easily stop trains at a certain distance past intersection:
Blueprint string
Usage
Some additional results I was curious about...
2-4-0 crossing two chain signaled lanes instead of just one, spaced as closely as possible, minimum time: 155
Crossing two lanes and stopping after 28 tiles: 155
Crossing two lanes and stopping immediately (21 tiles): 175
Crossing four lanes: 168
Crossing four lanes and stopping after 28 tiles: 169
Crossing four lanes and stopping immediately (21 tiles): 190

Compared to the single lane crossing minimum time of 148, even crossing four lanes unimpeded doesn't add too much to that. But when trying to stop immediately after clearing the intersection, the time still becomes significantly worse. And it'll only get longer if the intersections are more widely spaced or have more lanes.

And a 4-10-0 crossing four lanes unimpeded: 252 (from 238)
Stopping at 65 tiles: 253 (from 238)
Stopping at 49 tiles: 289 (from 272)
User avatar
ridesdragons
Inserter
Inserter
Posts: 28
Joined: Sun Feb 05, 2017 9:30 am
Contact:

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

Post by ridesdragons »

While disappointing that my poor intersection/roundabout ended up D-rank, I did take your advice on the matter of being unable to have 2 trains go straight at the same time, so I've updated the roundabout
Improved Reverse Roundabout
I've also figured out how blueprints work and made a string for you
Blueprint String
now, I just came up with this on the spot, and while it should be fine, it's entirely likely that things could go really, really wrong lol. if you see any problems, let me know and I'll see if I can fix it (or tell me it's unfixable, I can always just revert back to the regular roundabout). this design should have an improved throughput without sacrificing the ability to do a U-turn in a compact(ish) space.

also, sorry it's still right-hand drive. I can't rewire my brain to accept it lol.

EDIT: AND I'VE ALREADY FOUND A FATAL MISTAKE

lol just a sec, let me fix this...

ok, done. missed some chain signals in the middle and extra signals that were originally unneeded in the roundabout.
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 »

ridesdragons wrote:While disappointing that my poor intersection/roundabout ended up D-rank, I did take your advice on the matter of being unable to have 2 trains go straight at the same time, so I've updated the roundabout
Improved Reverse Roundabout
I've also figured out how blueprints work and made a string for you

now, I just came up with this on the spot, and while it should be fine, it's entirely likely that things could go really, really wrong lol. if you see any problems, let me know and I'll see if I can fix it (or tell me it's unfixable, I can always just revert back to the regular roundabout). this design should have an improved throughput without sacrificing the ability to do a U-turn in a compact(ish) space.

also, sorry it's still right-hand drive. I can't rewire my brain to accept it lol.

EDIT: AND I'VE ALREADY FOUND A FATAL MISTAKE

lol just a sec, let me fix this...

ok, done. missed some chain signals in the middle and extra signals that were originally unneeded in the roundabout.
To bad round-abouts deadlock when you disable stations while the train is in it and the new path crosses itself.
aaargha
Filter Inserter
Filter Inserter
Posts: 333
Joined: Wed Dec 07, 2016 8:35 am
Contact:

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

Post by aaargha »

ridesdragons wrote:While disappointing that my poor intersection/roundabout ended up D-rank, I did take your advice on the matter of being unable to have 2 trains go straight at the same time, so I've updated the roundabout

.....

now, I just came up with this on the spot, and while it should be fine, it's entirely likely that things could go really, really wrong lol. if you see any problems, let me know and I'll see if I can fix it (or tell me it's unfixable, I can always just revert back to the regular roundabout). this design should have an improved throughput without sacrificing the ability to do a U-turn in a compact(ish) space.

also, sorry it's still right-hand drive. I can't rewire my brain to accept it lol.

EDIT: AND I'VE ALREADY FOUND A FATAL MISTAKE

lol just a sec, let me fix this...

ok, done. missed some chain signals in the middle and extra signals that were originally unneeded in the roundabout.
Didn't give this one a thorough test as it should be about on par with the old one:

The D deadlock rating is pretty symptomatic of roundabout designs, so far I've only seen 3 roundabout designs that score better than that, of which only one has decent throughput. This design still intersects the straight paths as some parts are impossible to signal as needed, see below. I think that the entry "Crossabout" does what you're trying to do, it does not use a reversed roundabout but it might be worth a look.
Large blocks
No worries on the RHD signalling, the tests are built to handle both and I've built up my tolerance during this project :D
mrvn wrote:To bad round-abouts deadlock when you disable stations while the train is in it and the new path crosses itself.
Most yeah, I've only seen two that handles that well so far.
User avatar
ridesdragons
Inserter
Inserter
Posts: 28
Joined: Sun Feb 05, 2017 9:30 am
Contact:

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

Post by ridesdragons »

mrvn wrote:To bad round-abouts deadlock when you disable stations while the train is in it and the new path crosses itself.
that's why you, like, don't do that lol

I don't consider that to be a problem since it requires the player to do something incredibly stupid for that to happen. I always set my effected trains to manual mode before I start messing with the stops that it depends on. I'm more concerned about it breaking simply because the train changes it's mind mid-run. only fixes I can think of for this are to add a stupid amount of buffers everywhere, or to simply not let anything through if anything else is already in there, severely hurting throughput
aaargha wrote: Didn't give this one a thorough test as it should be about on par with the old one:

The D deadlock rating is pretty symptomatic of roundabout designs, so far I've only seen 3 roundabout designs that score better than that, of which only one has decent throughput. This design still intersects the straight paths as some parts are impossible to signal as needed, see below. I think that the entry "Crossabout" does what you're trying to do, it does not use a reversed roundabout but it might be worth a look.
Large blocks
AAAARGH I DIDN'T EVEN NOTICE THAT (your name is very apt lol)

yea, the only way I could fix that would be to make the tracks farther apart before turning left, or make the tracks wider before coming into the intersection at all. well, at least the edit is a minor improvement in throughput, since straight trains will leave the intersection faster than before, but it's a shame I couldn't fix the two-trains-can't-go-straight-at-the-same-time problem. thanks for pointing that out.
User avatar
ridesdragons
Inserter
Inserter
Posts: 28
Joined: Sun Feb 05, 2017 9:30 am
Contact:

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

Post by ridesdragons »

welp. here we go again.

I don't know what to think of this. half of me wants to say this is the ugliest fix I've ever done lol
improved-er reverse roundabout
here's a string for it
string
now every intersection is in its own block. 2 can go straight, 2 can turn left, 4 can turn right, and 1 can do a U turn

I could have just gone with other intersections, but this is the first (and only) track design I've made. I at least want to make it work right.

for the record, this uses: 416 straight rails, 64 chain signals, 5 big electric poles, and 4 rail signals. this thing is signal-hungry lol
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 »

aaargha wrote:
mrvn wrote:To bad round-abouts deadlock when you disable stations while the train is in it and the new path crosses itself.
Most yeah, I've only seen two that handles that well so far.
Which would that be? And how?

The problem is that a train can not cross a block that is already reserved/taken (by itself). This happens in a round about when the train takes a 270° turn. For short trains this would be fine but for long trains the train would hit itself.

Most round abouts are designed so a 270° turn has a shortcut, turning it into a 90° turn the other way. But when the train has already entered the round about and then re-paths to a 270° turn then it deadlocks. Afaik the only way to fix this is to have full signals inside the round about, which means 1) making it big enough to hold full train between signals and 2) has other deadlock issues.
ridesdragons wrote: that's why you, like, don't do that lol
Yes you do do that. Yes, I said do do.

I'm not talking about manually removing stations but about stations that use the logistics networks to be enabled/disabled. Disabling stations that already have a train present or stations with not enough items to fill a train is a very common setup. And then when a mine finally has enough ore to fill a train and gets enabled while a train is inside a round about it will re-path and can deadlock.
Locked

Return to “Railway Setups”