## 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.
TBTerra2
Inserter
Posts: 33
Joined: Wed Apr 05, 2017 12:57 pm
Contact:

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

Tallinu wrote:It has a lovely branching pattern that reminds me of fractals although I don't think it qualifies as one, but you can see the progression from single lanes crossing]
you actually expanded all of your crossings out so got even large and higher throughput than me.

its interesting you say fractal because its a pretty good finite fractal when you think about it.

look at just one leg
• there are 3, 4wide crossings in a group
• from that there are 2 groups of 3 2wide crossings
• from each of those there are 2 groups of 3 1wide crossings
also if you take a group of 2wide crossings and the 1wide crossings that go with them, you end up with a leg from the 4 wide junction (changing the direction of some signals obviously)

which you could use to infer that the 8lane leg, doubled, with 3 lots of 8 wide crossings, could be used to make a 16 lane junction

EDIT: Oh my. what have i done
16 lanes

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

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

Oehm, just that crossing is bigger than 99.99999% of all factories.

How many rails is that beast? Is there enough space for roboports so it can be build automatically when you blueprint it?

db48x
Fast Inserter
Posts: 105
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

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

That is a thing of beauty.

impetus maximus
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

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

isn't adding more and more crossings adding to the chance a train has to stop for a crossing train?

TBTerra2
Inserter
Posts: 33
Joined: Wed Apr 05, 2017 12:57 pm
Contact:

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

It does indeed, which is why the designs me and tallinu have been using have dedicated buffers inside the junction itself in order to keep up throughput

With regards to throughput, the current 16 line design has a P1 throughput of 620 trains per minute (just over 10 trains per second)

it also caused me to remake the benchmarking map to work with 16 lane junctions and it slows down to 40ups when running at full load

Tallinu
Fast Inserter
Posts: 119
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

It's a good thing nobody actually requires the throughput of even my 8-lane version. (Err... I certainly hope that's true, anyway!) It was intended primarily as an experient, testing how far the limits of the rail system could be pushed... I can imagine the 4-lane I posted being useful, though fitting it into a realistic network with larger trains might require dropping a couple of the less necessary buffer stages to avoid making it two or three times its current size (or more)!!

I definitely should get around to setting up and testing a high-throughput 4-lane T junction as well, for comparison purposes.

Tallinu
Fast Inserter
Posts: 119
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

Alright, here it is. Four lane T junction sized for six car trains, getting around 112-116 TPM. Since there are only three entrances and exits this is approximately equivalent to a four-way junction that scores around 150 TPM. I was surprised to find that it was noticeably slower than the fastest version of the MultiCross I'd designed (and a hair slower than the more compact version with fewer buffers, as well) instead of being slightly faster.

After some observation and thought, I believe the reason to be related to the fact that since there are only two possible destinations for an incoming train instead of three, trains are only being divided up among 2/3 as many parallel tracks, leading to more traffic on each track and as a result significantly reducing the performance of the first small crossings where one of the outer split lanes has to change places with one of the inner split lanes. With trains coming in as fast as the spawners can spit them out, and half of those trying to swap places instead of only a third, almost every train that tries to pass through those crossings end up having to come to a complete stop and wait for another train to cross, which regularly blocks up that buffer space and slows down all incoming traffic regardless of which way it wants to turn. I'm thinking I might be able to alleviate this by using a double crossing despite the fact that it isn't strictly necessary, further subdividing those lanes that need to cross into two and expanding the existing larger crossings closer to the center from 2x2 into 3x3...

At any rate, it does work quite well compared to a standard 4-lane T junction. For instance, the throughput I measured in a short test of a typical 4-lane unbuffered triangle T was about half as much at around 54-58, and even a buffered triangle (big enough to hold at least one full train between the intersections at each corner) with buffers long enough for 1.5 to 2 trains barely reached 80-81.
Screenshot
Blueprint String
For the triangle junctions I used as comparison:
Screenshot
Blueprint Book String

19wolf
Long Handed Inserter
Posts: 50
Joined: Fri May 06, 2016 3:49 pm
Contact:

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

Code: Select all

``0eNqlne9ukzkTxe8lnxvk8X9zK69WKygRG6mUqg2rFyHufVNIUtrO05yf82nFKhyOxx6PPT4zz4/Vx5tvm7v77e1u9f7Hanv99fZh9f5/P1YP28+3H24e/9/u+91m9X613W2+rK5Wtx++PP7p/sP2Zn34zc+r1fb20+b/q/f286+r1eZ2t91tN79hfv3h+9+337583Nzvf3AC+Lj9vN7cbK5399vr9d3Xm80e++7rw/5vfr19/Ff3aOv9r7/v/5PSz59Xr6DiCepht2fz+Z/d+pGUBxMOONHDSe6YXqP0d+UI867sh/xpe79n/+sH2YHNMr38FrsisouMXX0Oe/3Ph+3tIng4Ydse20Fr6ljjW0PthFM9x2monPpbnB6XzgHm+tv9v5tPi2vssFZje2784oGaCFoAZtQwkw/prRFLGuQAkLpX2MEtYnwO2zzYwmHzc9jkwVYZtgOyDaMqXLuKWn1Qd1ENCvpi/Obt20EFtahTjYZRFa4gyBxNEM4vgZg4bDy/BmImO+jaTjEjvooZrokLjriSMSqHVYzRkDEqtAUKVuUEbi/BXYvQ2PXSHh7jFChoOO8fyYgZzJgdkux9S8HCNUTCqIolsnpQOIRLawIo8LjDrFkX7FpVru0AOp6DVg+0Ya4v7eq5ceoq1wTsOnSuUbdrDhj2pQmiB2sXw3qWzfHi7dxlm/DxRkHVD44VoBZ1cel+kOtlmO5UNXqZlEYvHxnXZLXKvgUWVQnwhimByn4FjFoiPTIroOJN7HgJ3e+BHorsQ0v+7oXTUi48V7gDrpTqy/3Z2/ZLu9QALlcxQlnRHb4MEbO9NeFVv2lVfcKrUVRlbqoejeJxyuv5kFwTh+3n56fyPIbElucxJLYo27cex1O69ZendC/gVRycJFOgC9Y6Q85jJg/te1kLhGlkRJvBwPfStp6vtUgYN8g40UTMyyXsbTotY1TFELK/LV2vXK4VoypcdTeLRxPk837WOoet57ecNnCGS2HbA4cV2HajtwuJbMSoCteENsan/aYqea2epx6GXoO7BinwwP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k/9tIKOcFesWnjoXtCSp0NR5U+yLJUNKo+1UcM5cMwGWEGlsaft9jWxHX7HRpmtchOluXDVMdcM2SZOW6sznas2/qdY401n7NVF3EeiqCf9u5I+e6oqU7zqkylo8aquAKlm18dOSCW38tLBb4zpwmlGQuCTSNeEAK+hQUsMSJI1txLAS2zT1SmnSm39qeepDJyp6mfk4iQpeZ17ZVHD6sSbpy4egrYJ/YnC9r+HsocK14+yhwhVoLBbIur7XeVWG8lVN0nMhALb50p3CXbMdfyFXM0K91Ag+W/ohag2V9lfVUAc95SqoI9BMkoRqMJMkgUZ4wpNAE8zPSKD0oUsChaIL5cPTSe/RANa/LrvwQd1Ne/QLg6FPddDKraB8BJe2PVEskAOuTFe+ZZgDLMVNx0PMUC6QOeBaXOWr9DlQObtmizk9u2oKKmjXLIGek4+H5yhVF2ddu1Fdxr57QE279ClnpuI4vaqLdtC7QhwLRRVDGJW3a5aQE42/szXRzdZkUxsNlTdRxFxHOoIIcyEqBQeAxJ32U/CHy77ZeSr7lrRE2egRcIFlnEsZiizjTMowmc80alVvR3d+7LnhA8H04JLlssannuUDT3OPfP66Wm13my+Pdr35trm7397u9j//d3P/8FsnmXOsuZUS97b8Dxvp1vQ=``

It fits in 4 chunks. Wondering how well it works..

aaargha
Filter Inserter
Posts: 317
Joined: Wed Dec 07, 2016 8:35 am
Contact:

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

Man, I should go on vacation more often, coming back is like Christmas. It will take a while to get caught up on all the things I've missed, some quick things before I get lost examining the 0.15.27 bugfix and testing all the posted intersections:

Thank you Tallinu and TBTerra2 for your contributions, it's this kind of questionably useful intersections that I designed the test system for

On that note: Each spawning station can supply about 24 trains per minute, that means that for 2-lane intersections the original test bench can supply at most 96 trains per minute. For 4-lane it's 192, 6-lane: 288, and 8-lane: 348. It seems that once you get an intersection that reaches about 80-85% of that it starts to underestimate as it can no longer fully saturate the input lanes at all times.

It should be possible increase the supply to each lane if you use multiple spawning stations and make a setup that allows the trains to accelerate in parallel on different lines and then weave the two streams into one. If done well it should allow a large increase in maximum throughput as I'm pretty sure there would still be some room left before we reach 100% saturation on one line.
Zavian wrote:Also I'm curious to know whether the train fixes in 0.15.27 have effectively fixed the deadlocks with roundabouts.
While I'm not sure it's a silver bullet, initial testing seems very promising, at least for deadlock prevention in non loop based intersections. I'm not entirely sure that it will fix all the problems with roundabouts as I think there can be situations where the pathfinder will actually prefer the 450º turn over the 90º turn.

I'll need to do more testing but this fix most likely removes the B and C categories, and possibly D and E as well, though I'm not as sure about those.

Tallinu
Fast Inserter
Posts: 119
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

Aaargha, good to see you back (and to know you were just on vacation)!
19wolf wrote:It fits in 4 chunks. Wondering how well it works..
I gave this a test run, and it only got about 30 TPM for set 1 and 40 for set 2, even after I replaced eight unnecessary chain signals around the outside with regular signals to shorten the delay between trains.

I blame the fact that only two trains can ever be in the junction at a time, and in set 1 sometimes only a single train would be able to go. The main culprits are the large blocks at each outer corner which span both lanes. Being squeezed down into exactly 4 chunks doesn't leave enough room to properly break up those blocks with signals. The right turn lanes also share blocks along those inner diamond shapes. If those were all properly signaled it would be theoretically possible for two left turns, two right turns, and another pair of right turns on the opposite corner to take place all at once, for instance.

It turns out that the modifications I mentioned only require using up one additional track tile around each entry/exit. (The inner turn lane had enough room to shrink and insert the signals without adjusting anything else.) The changes make a huge difference, resulting in scores of around 50 and 58. Here's a string for that version if you want it:

Code: Select all

``0eNqlnetuVMkOhd+lfydHVXbtuvAqo9ERlxbTEgQUwuggxLufTthpIPFOf6v61wwzYcV7Vbku9rLr++7Nh6/7z7eHm7vdq++7w9tPN192r/76vvtyeH/z+sP9f7v79nm/e7U73O0/7q52N68/3v/p9vXhw+7H1e5w827/v92r/OPvq93+5u5wd9j//PsPf/j235uvH9/sb48/cPqbb7/e/rt/d/0AcLX7/OnL8e98urn/RUec63z8wW/Hf3o+gr873O7f/vy/y4+rZ5h2wvx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ZSMa9iz2vmKEu5hoYqtrWG01ULnXIwqTqamRiY5fuai9v9s1dRUXfPFTxEWk06SPJsEA44iOLRSfgeXkfk10cs6MIwNADFYhhWTXEGF7UjRUZW1VUZGubevIhIx2Rjz5RTpPjWxoXQFj4+S185XbqSYqMlE4lic0aScf0ktRIOuNBlRAxW4tWD9TOu0GZfIziYaEJ8aooU2J8NhUV8dmnZEvZ2XTVY+xA0VJy0l5Vf/pSe8hvlissyLt2JcuvdDIKZP0Rs7bMPRX3/EGd+LXuRXoC/Om4hQ8rZ/VtTsZvU57VZhOsixfOShhVpUjkYdJiaebBuOeTIJxjpjbQR0TQTguPmhgytUxVKDFy1eIM9v2yZIk8bVesqrDkcehibe695edPEsYDp4cNERljLicJrfYkV5IRrj1Pyfqp0Taj66fgYr9vA9qMwrs49HBqhO7ny1QOjvJQp94JpuhqH3BGc1eFNYhnudydvGlcdA2Hgdx6EV64eKzuS2DAinymZLAu5i8YteXSVS02Vi2rYgNWL6QgtlV9sJOhqo9ZMNQhHqcRKldqCFNAfbmCgZqWbTCQcC+8pYQwUlynEU+qcH3log1hpnLNhuBUwusVypxS351mqEPtBUJmVVUbe6EZUOXOrAaS42Wi8QTIY5fqcxcJyyhgUWlxyYoaBwTFBhSqjVDP4Y8mAlYbk9z4pqUxbFd7HRTiBrCk/ldfD0PWNrUxq4HMXmn6kRCkckqT6xqtEg7UIL6RUHZTFYZGQtkNV5n8DNrZCJ21QXcajyCAxSae1DzFps3kvjzHWGLua8Mkoe/E+mkW44hnuXuYv692h7v9x3s2Pnzdf7493Nwdf/zf/e2Xn8UEx3tSPc6KxY4M/B88Dv+x``

caterpie
Manual Inserter
Posts: 3
Joined: Fri May 12, 2017 3:17 pm
Contact:

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

Hi! I'm a new user on these forums but I've posted many setups on the factorio subreddit (under the name of /u/6180339887) and I want to share with you the intersecion I made. It's based on your intersections, just way bigger. It's a 32 lane version of the fractal intersecion.

So, here it is: http://i.imgur.com/Z72RS0y.png

As a disclaimer, I have to say that I have not tested it, so it may be missing some signals. It's way too big to be usable in a realistic base but I think it looks totally badass and I like it a lot. You can find the blueprint here: https://www.dropbox.com/s/01nyj68txvu4m ... ection.txt. Although pasting the blueprint for one of the four "arms" of the intersection froze the game for about 10 minutes, so I don't know how much the full intersection will take to paste... Anyway, if you have too many problems just tell me and I'll try to upload a blueprint for one arm.

Also, feel free to design a testing rig for this monster, as I am very curious to know its throughput!

Last edited by caterpie on Mon Jul 24, 2017 2:34 pm, edited 3 times in total.

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

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

aaargha wrote:On that note: Each spawning station can supply about 24 trains per minute, that means that for 2-lane intersections the original test bench can supply at most 96 trains per minute. For 4-lane it's 192, 6-lane: 288, and 8-lane: 348. It seems that once you get an intersection that reaches about 80-85% of that it starts to underestimate as it can no longer fully saturate the input lanes at all times.
My experiments have led me to believe that on a single track you can have a maximum of one 1:1 train every 73 ticks, or 49.315 trains per minute. I used 32 spawner and some circuit logic to make them interweave in an exactly timed pattern so they accelerate all the way while pairwise merging till there is a single track left. Maybe with longer acceleration one could pack the trains more dense but my setup already was HUGE. With 1:2, 2:2, 2:3, 2:4, ... trains there would be more distance between trains, so less TPM. And they accelerate slower so more track between merges would be required.

One thing that would interest me would be a multi lane junction designed with fast and slow lanes and some way to direct trains on the right lane. Say you have 10 T-junctions in a row going to different train stops. Trains going only 1-3 junctions for their next stop should take the slow lane and anything above should take the fast lane. The fast lane should have less intersections. Say only every second T-junction allows going from the fast lane to the stop or the slow lane. But then how do you make trains take the slow or fast lane depending on distance they will travel?

TBTerra2
Inserter
Posts: 33
Joined: Wed Apr 05, 2017 12:57 pm
Contact:

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

A possible, easier way of increasing per track max throughput, is to mod in a new fuel, that has a very high acceleration multiplier but a very short burn time (think 10X accel for 4 seconds), then fill the testing trains with one item of this jump start fuel, followed by a stack of rocket fuel

this would allow the train to do its initial acceleration and get out of the station very quickly, whilst not effecting the stop and start behaviour inside the intersection

db48x
Fast Inserter
Posts: 105
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

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

mrvn wrote:
aaargha wrote:On that note: Each spawning station can supply about 24 trains per minute, that means that for 2-lane intersections the original test bench can supply at most 96 trains per minute. For 4-lane it's 192, 6-lane: 288, and 8-lane: 348. It seems that once you get an intersection that reaches about 80-85% of that it starts to underestimate as it can no longer fully saturate the input lanes at all times.
My experiments have led me to believe that on a single track you can have a maximum of one 1:1 train every 73 ticks, or 49.315 trains per minute. I used 32 spawner and some circuit logic to make them interweave in an exactly timed pattern so they accelerate all the way while pairwise merging till there is a single track left. Maybe with longer acceleration one could pack the trains more dense but my setup already was HUGE. With 1:2, 2:2, 2:3, 2:4, ... trains there would be more distance between trains, so less TPM. And they accelerate slower so more track between merges would be required.
Another option to consider is simply giving the trains a non-zero speed when spawning them. My brother, who is a more accomplished modder than I am, tested it a while back (in isolation, not in this test map). Presumably the mod would only want to do this if there's a block for the train to move into.
mrvn wrote: One thing that would interest me would be a multi lane junction designed with fast and slow lanes and some way to direct trains on the right lane. Say you have 10 T-junctions in a row going to different train stops. Trains going only 1-3 junctions for their next stop should take the slow lane and anything above should take the fast lane. The fast lane should have less intersections. Say only every second T-junction allows going from the fast lane to the stop or the slow lane. But then how do you make trains take the slow or fast lane depending on distance they will travel?
This seems like a great idea. Assuming you could make the trains behave, how would you arrange the tracks so that the fast lane has fewer intersections? It still has to cross the T-junctions...

TBTerra2
Inserter
Posts: 33
Joined: Wed Apr 05, 2017 12:57 pm
Contact:

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

db48x wrote:Another option to consider is simply giving the trains a non-zero speed when spawning them. My brother, who is a more accomplished modder than I am, tested it a while back (in isolation, not in this test map). Presumably the mod would only want to do this if there's a block for the train to move into.
the mod already supports that but it has two main issues.
• trains must come to a stop before they will path to the end, so they spawn and immediately brake
• theres nothing to stop a train spawning at speed and ramming into the train that has just cleared the station

aaargha
Filter Inserter
Posts: 317
Joined: Wed Dec 07, 2016 8:35 am
Contact:

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

For those using the test save but are not following the thread for that or the mod: I've released a new version of the Automatic train deployment mod that should make setting things up less of a hassle, for details take a look at either of those threads.
caterpie wrote:Hi! I'm a new user on these forums but I've posted many setups on the factorio subreddit (under the name of /u/6180339887) and I want to share with you the intersecion I made. It's based on your intersections, just way bigger. It's a 32 lane version of the fractal intersecion.
*SNIP*
Welcome to the forums!

I saw the reddit post for that one, I think it's pretty safe to say that you're in the lead for least useful intersection so far , you've done a good job on your previous designs, though.
mrvn wrote:My experiments have led me to believe that on a single track you can have a maximum of one 1:1 train every 73 ticks, or 49.315 trains per minute. I used 32 spawner and some circuit logic to make them interweave in an exactly timed pattern so they accelerate all the way while pairwise merging till there is a single track left. Maybe with longer acceleration one could pack the trains more dense but my setup already was HUGE. With 1:2, 2:2, 2:3, 2:4, ... trains there would be more distance between trains, so less TPM. And they accelerate slower so more track between merges would be required.
I tried measuring how long a 2-4 train at max speed occupies a one cart long block (including reservation) and got 119 ticks, that would put the maximum throughput at almost exactly 30 trains per minute, far lower than my initial guesstimate but probably more in line with your numbers.
TBTerra2 wrote:A possible, easier way of increasing per track max throughput, is to mod in a new fuel, that has a very high acceleration multiplier but a very short burn time (think 10X accel for 4 seconds), then fill the testing trains with one item of this jump start fuel, followed by a stack of rocket fuel

this would allow the train to do its initial acceleration and get out of the station very quickly, whilst not effecting the stop and start behaviour inside the intersection
This is probably the easiest way to go about it, honestly. Just make sure to name it Nitro
db48x wrote:Another option to consider is simply giving the trains a non-zero speed when spawning them. My brother, who is a more accomplished modder than I am, tested it a while back (in isolation, not in this test map). Presumably the mod would only want to do this if there's a block for the train to move into.
The mod actually already has support for this, send S > 0 to the output stop, unfortunately this does not work well, at least when I tested it while creating the mod (I had pretty much the same idea). What happens is that the train spawns at max speed and then quickly brakes to a stop before continuing like normal. Basically setting the speed via scripts makes the train react the same as if you'd toggle manual mode on and off while at high speed.

EDIT: Damn you TBTerra2! Don't post while I'm typing!
mrvn wrote:One thing that would interest me would be a multi lane junction designed with fast and slow lanes and some way to direct trains on the right lane. Say you have 10 T-junctions in a row going to different train stops. Trains going only 1-3 junctions for their next stop should take the slow lane and anything above should take the fast lane. The fast lane should have less intersections. Say only every second T-junction allows going from the fast lane to the stop or the slow lane. But then how do you make trains take the slow or fast lane depending on distance they will travel?
This would probably be a more useful way of using multiple lanes than making them all equal generic lanes. I think trains could be encouraged to choose the correct lanes by strategically placing stations along the main line, though figuring out where might be a bit tricky. Also, renaming all the stations to not clutter the list will probably become tedious pretty quickly.

Tallinu
Fast Inserter
Posts: 119
Joined: Sun Jun 14, 2015 8:14 am
Contact:

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

mrvn wrote:I used 32 spawner and some circuit logic to make them interweave in an exactly timed pattern so they accelerate all the way while pairwise merging till there is a single track left. Maybe with longer acceleration one could pack the trains more dense but my setup already was HUGE. With 1:2, 2:2, 2:3, 2:4, ... trains there would be more distance between trains, so less TPM. And they accelerate slower so more track between merges would be required.
I'd be interested in screenshots and/or a blueprint, particularly for a setup where it's just two parallel spawners with circuit-controlled merging. I'd had an idea about doing something like that, since it doesn't seem like there's any way to force trains to stop or slow down before reaching a red signal and then begin accelerating when the other train is about to clear the merge point. I was thinking that a series of signals along the incoming tracks, cross-wired to the parallel line of signals, each line reading its own state and closing if its partner in the other line was closed, might do the job. But I haven't had time to set up and test such a thing.

aaargha
Filter Inserter
Posts: 317
Joined: Wed Dec 07, 2016 8:35 am
Contact:

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

Tallinu wrote:I'd be interested in screenshots and/or a blueprint, particularly for a setup where it's just two parallel spawners with circuit-controlled merging. I'd had an idea about doing something like that, since it doesn't seem like there's any way to force trains to stop or slow down before reaching a red signal and then begin accelerating when the other train is about to clear the merge point. I was thinking that a series of signals along the incoming tracks, cross-wired to the parallel line of signals, each line reading its own state and closing if its partner in the other line was closed, might do the job. But I haven't had time to set up and test such a thing.
I tried making something like that but ran in to some strangeness with trains stopping instantly, depending on which signals were closed (apparently it's not a bug), so I think you may need to make sure that only one signal on each line is closed via circuits at a time for it to work, but I haven't looked into it too much.

db48x
Fast Inserter
Posts: 105
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

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

aaargha wrote:
db48x wrote:Another option to consider is simply giving the trains a non-zero speed when spawning them. My brother, who is a more accomplished modder than I am, tested it a while back (in isolation, not in this test map). Presumably the mod would only want to do this if there's a block for the train to move into.
The mod actually already has support for this, send S > 0 to the output stop, unfortunately this does not work well, at least when I tested it while creating the mod (I had pretty much the same idea). What happens is that the train spawns at max speed and then quickly brakes to a stop before continuing like normal. Basically setting the speed via scripts makes the train react the same as if you'd toggle manual mode on and off while at high speed.

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

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

db48x wrote:
mrvn wrote: One thing that would interest me would be a multi lane junction designed with fast and slow lanes and some way to direct trains on the right lane. Say you have 10 T-junctions in a row going to different train stops. Trains going only 1-3 junctions for their next stop should take the slow lane and anything above should take the fast lane. The fast lane should have less intersections. Say only every second T-junction allows going from the fast lane to the stop or the slow lane. But then how do you make trains take the slow or fast lane depending on distance they will travel?
This seems like a great idea. Assuming you could make the trains behave, how would you arrange the tracks so that the fast lane has fewer intersections? It still has to cross the T-junctions...
You would have to put the T-junctions all on the same side. Say the track goes left to right and the T-junctions go up. Then from the top you have 2 slow lanes and then 2 fast lanes. Then you can have small and big T-junctions.

Getting the trains to behave is indeed the problem. If the fast lanes are "cheaper" then trains will try to use it whenever possible. But ideally you would want trains to start on the slow lane, accelerate and only then switch to the fast lane. Same in reverse, you want them to leave the fast lane before they need to break. But since the fast lane is "cheaper" they will try to get on it any chance they got.

I'm not sure if you could maybe add circuit controlled signals that only allow entering the fast lane once a train has some speed.

### Who is online

Users browsing this forum: No registered users