3 and 4 way intersections
Re: 3 and 4 way intersections
Based on a little bit of my testing it seems that many buffered intersections out there encourage trains to turn rather than go straight. This may be because of the longer paths inside the intersection from the buffering. Regardless, it leads to high scores on the testbench, where only a single intersection is being tested, but I suspect it degrades overall rail network performance in practical situations where there are many intersections (especially in city block or city brick configurations).
Does anyone have thoughts on this, or how an intersection might "hint" to a train that it should or should not turn?
Edit: You'll see the performance degradation in scenarios where the entrance or exit are placed diagonally relative to each other, because trains that could have pathed around the outer edge of the rectangle between both points will attempt to path diagonally instead; and therefore there is more risk that they cross paths.
Does anyone have thoughts on this, or how an intersection might "hint" to a train that it should or should not turn?
Edit: You'll see the performance degradation in scenarios where the entrance or exit are placed diagonally relative to each other, because trains that could have pathed around the outer edge of the rectangle between both points will attempt to path diagonally instead; and therefore there is more risk that they cross paths.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
What do you mean with network performance? Like I want an definition related to Factorio with metrics.causa-sui wrote: ↑Mon Apr 11, 2022 1:33 pm Based on a little bit of my testing it seems that many buffered intersections out there encourage trains to turn rather than go straight. This may be because of the longer paths inside the intersection from the buffering. Regardless, it leads to high scores on the testbench, where only a single intersection is being tested, but I suspect it degrades overall rail network performance in practical situations where there are many intersections (especially in city block or city brick configurations).
You suspecting something is a reason to try to figure it out yourself. You can set up test to test your idea.
The downside to an buffered intersection compared to smaller intersections is that you need to have more trains in your network to transport the same number of resources since the distance the train have to travel gets longer or only a bit longer depending on how far they had to go in the first place. That is what you mean with turns right? That trains have to take a longer path. You probably know but trains don't lose speed in curves in Factorio like they do in transport tycoon. The only other time I have heard people caring about curves vs straights are players that come from openTTD.
Re: 3 and 4 way intersections
At the moment I'm not sure the best way to gather metrics, so I'm seeking advice on that as well.hansjoachim wrote: ↑Tue Apr 12, 2022 8:07 amWhat do you mean with network performance? Like I want an definition related to Factorio with metrics.causa-sui wrote: ↑Mon Apr 11, 2022 1:33 pm Based on a little bit of my testing it seems that many buffered intersections out there encourage trains to turn rather than go straight. This may be because of the longer paths inside the intersection from the buffering. Regardless, it leads to high scores on the testbench, where only a single intersection is being tested, but I suspect it degrades overall rail network performance in practical situations where there are many intersections (especially in city block or city brick configurations).
I was able to confirm that this is not a property of buffered intersections specifically, but rather how trains path in general. Here's an example:
My goal is to get trains to take the straight path rather than this "step" pattern, since that should result in fewer crossed paths.
I don't know why you're being so defensive. I have a problem and I'm hoping folks here might be able to help with it. You aren't obligated to respond.hansjoachim wrote: ↑Tue Apr 12, 2022 8:07 am You suspecting something is a reason to try to figure it out yourself. You can set up test to test your idea.
I hope the explanation above clarifies this, but my concern isn't with making the path as short as possible or with prohibiting turns generally, since I know momentum is conserved like you explained.hansjoachim wrote: ↑Tue Apr 12, 2022 8:07 am The downside to an buffered intersection compared to smaller intersections is that you need to have more trains in your network to transport the same number of resources since the distance the train have to travel gets longer or only a bit longer depending on how far they had to go in the first place. That is what you mean with turns right? That trains have to take a longer path. You probably know but trains don't lose speed in curves in Factorio like they do in transport tycoon. The only other time I have heard people caring about curves vs straights are players that come from openTTD.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
There isn't really a test and set metric to test networks. It would be cool to make an network that can make 2k spm or more and the limiting factor being the the intersections. That way we could sort of find how to make a good network and set a score for each setup. It would be very artificial though.causa-sui wrote: ↑Tue Apr 12, 2022 2:00 pm At the moment I'm not sure the best way to gather metrics, so I'm seeking advice on that as well.
I was able to confirm that this is not a property of buffered intersections specifically, but rather how trains path in general. Here's an example:
unknown.png
My goal is to get trains to take the straight path rather than this "step" pattern, since that should result in fewer crossed paths.
Sorry didn't mean to be defensive.
Trains picks the route with the least cost. I think red lights increase cost and maybe stopped trains, have to check that.
If there is congestion trains will take a longer path. So I don't see the problem. Getting trains to go as straight as possible is possible if you add cost to each turn. For example trainstops on each turn or combinator blocked rail signal that turns green on approach.
This intersecion should disccourage turns without impacting throughput.
https://factoriobin.com/post/nXuR2K9_
- Attachments
-
- render-b2b3166ade0069cc.jpg (255.04 KiB) Viewed 6693 times
Re: 3 and 4 way intersections
Technically, they don't actually cross more paths, because a left turn and a straight both cross 4 paths in LHD. In your example, all of the outside rails are dead tho, which would obviously change this.causa-sui wrote: ↑Mon Apr 11, 2022 1:33 pm You'll see the performance degradation in scenarios where the entrance or exit are placed diagonally relative to each other, because trains that could have pathed around the outer edge of the rectangle between both points will attempt to path diagonally instead; and therefore there is more risk that they cross paths.
As for performance, I don't think it would be such a big issue. As HansJoachim already mentioned, once the traffic accumulates in the center, the trains will naturally avoid the area and move further and further to the outside until they probably grid lock. This usually works, but also isn't perfect.
If you want to take a more active role in managing your trains, you could try to work with penalties. The easiest way to apply these are train stations, because these don't interrupt traffic and count as a solid 2000 tiles of track. For example you could have some sort of highway lane running through your grid and then place a penalty on every entry into the finer inner grid.
Re: 3 and 4 way intersections
After some additional testing I've thoroughly convinced myself that you are right and this is not a property of buffered intersections at all, but rather it's a consequence of how trains path in factorio more generally. That means this problem, while real, is off topic for this thread. Therefore, I'll take some of your suggestions into account and develop solutions elsewhere. Sorry for the detour, and thanks for everything y'all have contributed here.
Re: 3 and 4 way intersections
This is really the way, i was wondering why posted 3-ways are still unoptimized at the center. When 3 rails form a triangle, only 1 train can pass at the time. It doesn't add any benefits putting chain signals in it, but instead shrink the rails to form a "star". It makes chain-rail pairs closer together and lets trains clear the crossing faster.
Re: 3 and 4 way intersections
I am back with more intersections.
I took some inspiration from my blitz roundabout but then i rotated it 45°and added frontend buffers. The first design does not use parallel buffers for the same direction and it scored slightly better than Windmill MK2. The second design has more parallel buffers than absolutely necessary which made it score about the same as Hurricane 1.2. The intersections does look somewhat similar to mosaic tiles and hence the reasoning behind the names.
Mosaic MK1
RHT, Size: 176x176, Spacing: 4 tiles, Train length: 1 to 6 cars
LHT, Size: 176x176, Spacing: 4 tiles, Train length: 1 to 6 cars
RHT, Size: 220x220, Spacing: 4 tiles, Train length: 1 to 6 cars
LHT, Size: 224x224, Spacing: 4 tiles, Train length: 1 to 6 cars
There was an accident while designing the intersections which made this beautiful pattern that I'd like to share.
I took some inspiration from my blitz roundabout but then i rotated it 45°and added frontend buffers. The first design does not use parallel buffers for the same direction and it scored slightly better than Windmill MK2. The second design has more parallel buffers than absolutely necessary which made it score about the same as Hurricane 1.2. The intersections does look somewhat similar to mosaic tiles and hence the reasoning behind the names.
Mosaic MK1
RHT, Size: 176x176, Spacing: 4 tiles, Train length: 1 to 6 cars
LHT, Size: 176x176, Spacing: 4 tiles, Train length: 1 to 6 cars
image
Mosaic MK2RHT, Size: 220x220, Spacing: 4 tiles, Train length: 1 to 6 cars
LHT, Size: 224x224, Spacing: 4 tiles, Train length: 1 to 6 cars
Image
There was an accident while designing the intersections which made this beautiful pattern that I'd like to share.
Mosaic ball.JPG
Re: 3 and 4 way intersections
They were probably made to be converted into a symmetrical cross. So they were "optimized" for ease of use. I don't believe the score is much different anyhow which is why I personally didn't change it but I could optimize them for tpm after I get the parts for my computer since it died...
They look cool! It might take me a bit to get around to testing (unless another gets to it first!) because of the aforementioned computer issues... :/
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
Great as always Hovedgade, I like those intersections. I tested them and got the same score as you. Thanks again for the formula, its in use with the TPM adjuster.Hovedgade wrote: ↑Fri May 27, 2022 7:09 pm I am back with more intersections.
I took some inspiration from my blitz roundabout but then i rotated it 45°and added frontend buffers. The first design does not use parallel buffers for the same direction and it scored slightly better than Windmill MK2. The second design has more parallel buffers than absolutely necessary which made it score about the same as Hurricane 1.2. The intersections does look somewhat similar to mosaic tiles and hence the reasoning behind the names.
Mosaic MK1
RHT, Size: 176x176, Spacing: 4 tiles, Train length: 1 to 6 cars
LHT, Size: 176x176, Spacing: 4 tiles, Train length: 1 to 6 carsimageMosaic MK2
RHT, Size: 220x220, Spacing: 4 tiles, Train length: 1 to 6 cars
LHT, Size: 224x224, Spacing: 4 tiles, Train length: 1 to 6 carsImage
There was an accident while designing the intersections which made this beautiful pattern that I'd like to share.Mosaic ball.JPG
Re: 3 and 4 way intersections
Abstract 4-lane 3-way
I've done it! I've made a working junction out of scribbles!Using Throughput tester v5.0.7
RHT/LHT (When did D become T? What does T stand for?)
Score: 112/110
Set1: 115/114
Set2: 110/107
I couldn't get it to be perfectly stable like with clockwork, so the score you get will be rather sensitive to signal spacing on the input lines, but the given score is what you should get if you don't bother with that and just rely on the provided entrance buffers. This junction was designed for a signal spacing of 60-ish tiles, or roughly 8 to 9 cars long.
Abstract construction guide
Resizing it is easier than it looks because it's actually made out of equilateral triangles, so you just need to resize four different connecting segments. Aside from that, there are the three places that cross in parallel instead of merge (red), three places that merge instead of cross (green), and three places where the outer lane splits and merges into an exit (blue).2-coloring
I thought of using constant combinators to find a good 2-coloring first, then building that 2-coloring with rails. As you can guess, my attempts at step 2 were rather unsuccessful until I realized the whole thing was made of triangles.Continuing my investigations into this synchronous behavior, I made a graph on desmos that calculates the expected TPM per lane for synchronous crossings across different buffer lengths, for a given train design and crossing length in meters. It includes the special cases where the train hits max speed, and when it's max speed from the start. The train stats used were found through a bit of research and a lot of experimentation. The units are all SI units.
-Thrust, (b)raking force, and friction are in Newtons.
-(d) is braking distance.
-Drag is in Newtons per (meters per second), or Newton-seconds per meter.
-t0 : the back of the train is against the rail signal behind it with the stop point at the chain signal in front.
-t1a: the time it takes for the stop point to reach the chain signal of the next crossing.
-t2a: the time it takes for the brakes to slow the train back to v0.
-switches to tb if the train would hit max speed before the stop point reaches the next crossing
-t1b: the time needed to reach max speed from v0.
-t2b: the time it takes after t1b for the train to be fully within the next buffer.
-t3b: the time it takes for the brakes to slow the train back to v0.
I'd love to say I know exactly how the formulas for distance/velocity/acceleration over time come about, but the truth is I found the velocity formula while experimenting with regressions in desmos and guessing at where the variables should go.
So, did this graph help me understand synchronous crossings?
... not really, no. I thought maybe using the buffer length with the most throughput would translate to being the most stable, but building abstract like that was just as unstable as the one used here. At this point I'm kind of out of ideas as to how to figure out what makes it stable.
Edit: Updated scores and added a rail signal to the LHT version.
Abstract RHT & LHT
Last edited by farcast on Wed Jun 01, 2022 9:34 pm, edited 2 times in total.
Efficient inefficient design.
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
Hey Farcast, what a cool intersection! I'll test it later. RHD is a term describing where the wheel is placed in a car so cars with RHD drives on the left side of the road. Since our use of RHD/LHD is completely wrong and opposite to real life, we decided to use a better term which is Right Hand Traffic and Left Hand Traffic. Which are precise and correct terms.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: 3 and 4 way intersections
Shouldn't that be right side?
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
In my language we say translated rightdriving/leftdriving where rightdriving is driving on the right.
But in English right hand drive means the steering wheel is on the right side of the car. And cars with the steering wheel on the right side are made for driving on the left side of the road.
Source:
https://dictionary.cambridge.org/dictio ... hand-drive
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: 3 and 4 way intersections
Erm, ok. I'm a native English speaker and I've always understood RHD/LHD to be the side of the road you're driving on, not the steering wheel. Dunno, maybe I learned differently? I don't have anyone to compare with.hansjoachim wrote: ↑Wed Jun 01, 2022 2:01 pmIn my language we say translated rightdriving/leftdriving where rightdriving is driving on the right.
But in English right hand drive means the steering wheel is on the right side of the car. And cars with the steering wheel on the right side are made for driving on the left side of the road.
Source:
https://dictionary.cambridge.org/dictio ... hand-drive
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
On the old 4 way forum aaargha used RHD/LHD wrong and I think many learned it from there. I think especially us that are non native English speakers didn't question it. I didn't question it before I saw multiple times in the Factorio discord chat that we are using RHD/LHD wrong.FuryoftheStars wrote: ↑Wed Jun 01, 2022 2:04 pmErm, ok. I'm a native English speaker and I've always understood RHD/LHD to be the side of the road you're driving on, not the steering wheel. Dunno, maybe I learned differently? I don't have anyone to compare with.hansjoachim wrote: ↑Wed Jun 01, 2022 2:01 pmIn my language we say translated rightdriving/leftdriving where rightdriving is driving on the right.
But in English right hand drive means the steering wheel is on the right side of the car. And cars with the steering wheel on the right side are made for driving on the left side of the road.
Source:
https://dictionary.cambridge.org/dictio ... hand-drive
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: 3 and 4 way intersections
Huh, ok. I just got through doing some googling, too, and yeah, you're right. :/ Will probably take me a while to unlearn that....hansjoachim wrote: ↑Wed Jun 01, 2022 2:24 pm On the old 4 way forum aaargha used RHD/LHD wrong and I think many learned it from there. I think especially us that are non native English speakers didn't question it. I didn't question it before I saw multiple times in the Factorio discord chat that we are using RHD/LHD wrong.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
I think the terms can live side by side. Switching LHD with RHD would make chaos, so going to RHT and LHT is easier since it's only changing a letterFuryoftheStars wrote: ↑Wed Jun 01, 2022 2:30 pmHuh, ok. I just got through doing some googling, too, and yeah, you're right. :/ Will probably take me a while to unlearn that....hansjoachim wrote: ↑Wed Jun 01, 2022 2:24 pm On the old 4 way forum aaargha used RHD/LHD wrong and I think many learned it from there. I think especially us that are non native English speakers didn't question it. I didn't question it before I saw multiple times in the Factorio discord chat that we are using RHD/LHD wrong.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: 3 and 4 way intersections
Agreed, I get that. I'm just saying it's going to take me a while to unlearn (or relearn) what LHD and RHD really mean.hansjoachim wrote: ↑Wed Jun 01, 2022 3:12 pmI think the terms can live side by side. Switching LHD with RHD would make chaos, so going to RHT and LHT is easier since it's only changing a letterFuryoftheStars wrote: ↑Wed Jun 01, 2022 2:30 pmHuh, ok. I just got through doing some googling, too, and yeah, you're right. :/ Will probably take me a while to unlearn that....hansjoachim wrote: ↑Wed Jun 01, 2022 2:24 pm On the old 4 way forum aaargha used RHD/LHD wrong and I think many learned it from there. I think especially us that are non native English speakers didn't question it. I didn't question it before I saw multiple times in the Factorio discord chat that we are using RHD/LHD wrong.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
- hansjoachim
- Filter Inserter
- Posts: 252
- Joined: Wed Apr 26, 2017 7:03 pm
- Contact:
Re: 3 and 4 way intersections
I don't think you need to, since people will use RHD for RHT in Factorio for years to come. I'm pretty sure no one will call "RHT" for LHD.FuryoftheStars wrote: ↑Wed Jun 01, 2022 3:16 pmAgreed, I get that. I'm just saying it's going to take me a while to unlearn (or relearn) what LHD and RHD really mean.hansjoachim wrote: ↑Wed Jun 01, 2022 3:12 pmI think the terms can live side by side. Switching LHD with RHD would make chaos, so going to RHT and LHT is easier since it's only changing a letterFuryoftheStars wrote: ↑Wed Jun 01, 2022 2:30 pmHuh, ok. I just got through doing some googling, too, and yeah, you're right. :/ Will probably take me a while to unlearn that....hansjoachim wrote: ↑Wed Jun 01, 2022 2:24 pm On the old 4 way forum aaargha used RHD/LHD wrong and I think many learned it from there. I think especially us that are non native English speakers didn't question it. I didn't question it before I saw multiple times in the Factorio discord chat that we are using RHD/LHD wrong.