Rail bridge interchange with no shared track (rail bridges mod)

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.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Rail bridge interchange with no shared track (rail bridges mod)

Post by sparr »

https://mods.factorio.com/mod/rail-bridge
Screenshot from 2019-06-22 15-08-36.png
Screenshot from 2019-06-22 15-08-36.png (342.04 KiB) Viewed 2716 times
This interchange has no shared rail blocks unless two trains share an entry or exit point. Any two trains can enter at the same time and proceed at full speed unless their path in or out coincides.

Blueprint:

Code: Select all

0eNqdXNlOI0kQ/Jd+tkeVmXXyK6PVyoDFtARmZMxoEeLf1zZlDpNNR8wT4nCQVXlWRlY9D5e3j+vf23GzGy6eh/HqfvMwXPx8Hh7Gm83q9vCz3dPv9XAxjLv13bAYNqu7w3fb1Xg7vCyGcXO9/m+4kJd/FsN6sxt34/r188dvnv7dPN5drrf7P3j75NXj9s/6enkEWAy/7x/2n7nfHP7RHmeZFsPT/ovZHvt63K6vXn+ZXhZfIBWDNB8xOoj2hviw24Pd/NpNYGrHzC8OSmRRooeSWBT1UDKKsqyvMFo/b1NxQAsLauEzqDmgFdOmdDHLvH00dgeDt4MSUJjsL9YTTYQEPVeLeKAK6+WwqCNsnte2GA9b5/UtrJvsQT0Y2E8mDNxVT2ZBM6Ae3G3ktOQIqKfysBlQT6OiqwLRVWFPmjJPNwsIjRrnlaVgcllKT1gqAKiBoEZgRjBuvmN6KImNR0CQ04yJ1l4hpcwbu5ZPBciyFylfIMuPrhZpP9K8sWvFYNMbbDmHVQ+2fYa9+rUaN5Pgohy6BdCatOdMOQPNHqh8FvlyO17frD2774YgBxf9s9qOq2kbNSIxxQ+wcxuAupNMbIBnChbpcArJmugkCsHS9R2EimeqTKBW0LQiYVlwjbcklBXhREWoKgpZ70CgsGcRfhWNTAYQaOSSARCrIlv6QXJmtpyAUGGPYoJKBD1KCI+KYN0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/uUglOQ/9RCqT6FKIY/7E9Kw6cOHqQE05RMzXBBSSCo7/IKMcQnO42v0rM615WrsQCkyGyE1kp1NQzaAboj58yBSM3fd4Vw6t7qu7F1OZIZIKukuUytumKFbt/OvAzquRhp5oxOyHZTPb7jlEIR+/G4bm1EkAGQ3BKGvuN003lf8HkTL1KzKKVB+na70dV1I854Qkp0Um8LhrpmlycX6lzYD1wgWgJfSIGQsQy7xBbq9LAAvp4E+4mOwke0GY7DsQD+Gmsl+MIbKcjEYKkv4Y6gk4Q+BcoQ/5Fks4Y/JSRL+GChJ+GOgLOGPobKEP4bKEf6Y+gvXvJAGpACpfzf5KQlhs1XAMu89TWO4xCxAt7CKPAwgzEMl5/vr3pNHHxvofR0M08BNPY3xCzSmq+jIQG8hTzw3wEwJdP5BkUVnGhZ6C6JQ7zZoQjDZ/jTyFogSAwXB3Va3sLJAE9cR0JYJDZuRRzaUyyvIGzhqZLI63wB/XyNL3SPvoRhbASJvC6mx127U7cOqkVc6kfeo1CoJmhHtNCrSmR/pIjuQ5j9zpFEYhsygl2OUFM1/IEvxuYETjvo4kcWJL4dn544P0118eMduXyattw+v5mJBStmfCQ7/83/uD7pZ

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

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by hansjoachim »

Why have you placed chainsignals? You don't need any of them.
Updated version of aaarghas intersection testbench. viewtopic.php?f=194&t=46855&p=383830#p383830
My Highscore intersections: https://pastebin.com/dGsJT71Z
Combinator Adaptable merger https://pastebin.com/aLPQQeei

sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by sparr »

They prevent a train from turning left then getting stuck, blocking other forward or right turning traffic, if there's an alternate path to their destination.

Zijkhal
Inserter
Inserter
Posts: 20
Joined: Thu Sep 07, 2017 4:32 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by Zijkhal »

hansjoachim wrote:
Fri Jul 05, 2019 10:47 pm
Why have you placed chainsignals? You don't need any of them.
chain signals can make trains repath, that why we put chain signals at the entry of Stackers

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2646
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by Optera »

With diagonal bridges this probably could be made more compact.

sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by sparr »

I tried and could not come up with a smaller version using diagonal bridges, because there are so many curves.

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

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by DaveMcW »

You can get quite compact if you don't need U-turns. The main bottleneck becomes waiting for trains to merge onto the same exit, which can only be solved with buffers.

full-diamond.jpg
full-diamond.jpg (121.78 KiB) Viewed 2435 times

sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by sparr »

You can get even more compact if you don't need left turns :)

mmmPI
Filter Inserter
Filter Inserter
Posts: 456
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mmmPI »

Are you allowed to share the U turn ? or is this qualify of some sort ? I tried to put the diamond inside a roundabout, some lanes are "too many" sort of.

Impressed by the other design so far :D
roundiamond.jpg
roundiamond.jpg (146.84 KiB) Viewed 2381 times
“In any field, the Establishment is seldom in pursuit of the truth, because it is composed of those who sincerely believe that they are already in possession of it.”
— Edwin Thompson Jaynes

mmmPI
Filter Inserter
Filter Inserter
Posts: 456
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mmmPI »

failed at editing previous post, so here comes double post.

Did you notice how times fly so fast when you are doing those ?

i have tried a few designs and ended up founding a very similar to original design, a little different, no more horizontal or vertical symetry.
Here it is:
20190707221453_1.jpg
20190707221453_1.jpg (113.69 KiB) Viewed 2379 times
the one above

Here are some other looks, in case.
20190707221459_1.jpg
20190707221459_1.jpg (129.02 KiB) Viewed 2379 times
the one above

Here are some other looks, in case.
20190707221511_1.jpg
20190707221511_1.jpg (168.07 KiB) Viewed 2379 times
the one above

Here are some other looks, in case.
20190707221520_1.jpg
20190707221520_1.jpg (199.07 KiB) Viewed 2379 times
the one above

Here are some other looks, in case.
20190707221530_1.jpg
20190707221530_1.jpg (248.76 KiB) Viewed 2379 times
the one above

Here are some other looks, in case.
20190707221539_1.jpg
20190707221539_1.jpg (212.34 KiB) Viewed 2379 times
the one above
“In any field, the Establishment is seldom in pursuit of the truth, because it is composed of those who sincerely believe that they are already in possession of it.”
— Edwin Thompson Jaynes

slippycheeze
Filter Inserter
Filter Inserter
Posts: 586
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by slippycheeze »

sparr wrote:
Sat Jun 22, 2019 10:13 pm
https://mods.factorio.com/mod/rail-bridge

This interchange has no shared rail blocks unless two trains share an entry or exit point. Any two trains can enter at the same time and proceed at full speed unless their path in or out coincides.
This is effectively placing (part of) the train on a separate surface, while in the tunnel, yes?

sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by sparr »

No, this mod abuses a bug where trains are only checked for collision if they are in the same rail block, and rail blocks only connect if the collision boxes for their rail entities overlap. So the bridge is actually two rail entities with collision boxes that don't overlap but otherwise do they jobs they need to. This bug was identified when someone found a combination of vanilla curved and straight rails that triggered it, and the devs chose to fix just that combination without eliminating the bug which made this mod possible. Hooray :)

This mod has no side effects with routing or signals or anything like that, so it's better than every other rail bridge mod in almost every way.

sparr
Smart Inserter
Smart Inserter
Posts: 1095
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by sparr »

mmmPI wrote:
Sun Jul 07, 2019 4:16 am
Are you allowed to share the U turn ? or is this qualify of some sort ?
If you combine all the U-turn routes into a roundabout then it's possible for a train to route into its own tail end which causes problems.

mmmPI
Filter Inserter
Filter Inserter
Posts: 456
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mmmPI »

It woud indeed be problematic. Though you can keep train lengh < roundabout perimeter. Or not make them repath. I was also considering pathfiding when asking and just generally curious, I was fiddling to make a station that unload water to nuclear plant and load steam for various unconnected outpost using the bridges. Fiddling to make junctions ended up being more meaningful :)
“In any field, the Establishment is seldom in pursuit of the truth, because it is composed of those who sincerely believe that they are already in possession of it.”
— Edwin Thompson Jaynes

mmmPI
Filter Inserter
Filter Inserter
Posts: 456
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mmmPI »

sparr wrote:
Sat Jul 06, 2019 10:22 pm
I tried and could not come up with a smaller version using diagonal bridges, because there are so many curves.
After trying a lot i came up with the same conclusion, diagonal bridges are 45° angle with the horizontal or the vertical, that's fine for other things, but trying to compact things you are often tempted to think about them as 90° angle that would be formed with the diagonals NE-SW and NW-SE.
Each diagonal bridge is also 4x2 tiles rather than 2X2.

To shift the problem around i tried making diagonal entrance and exit and it worked ! An "X" instead of a "+". It is a bit smaller than original design, but entrance and exit are not aligned.
20190711150138_1.jpg
20190711150138_1.jpg (119.04 KiB) Viewed 2258 times
“In any field, the Establishment is seldom in pursuit of the truth, because it is composed of those who sincerely believe that they are already in possession of it.”
— Edwin Thompson Jaynes

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

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mrvn »

sparr wrote:
Sun Jul 07, 2019 11:44 pm
No, this mod abuses a bug where trains are only checked for collision if they are in the same rail block, and rail blocks only connect if the collision boxes for their rail entities overlap. So the bridge is actually two rail entities with collision boxes that don't overlap but otherwise do they jobs they need to. This bug was identified when someone found a combination of vanilla curved and straight rails that triggered it, and the devs chose to fix just that combination without eliminating the bug which made this mod possible. Hooray :)

This mod has no side effects with routing or signals or anything like that, so it's better than every other rail bridge mod in almost every way.
I wonder if you could make 2 sets of rails with their collision boxes set so the 2 rail types don't collide but still have the normal collisions inside the same set. Think rails on the ground and raised rails. Or would it be enough to make their collision masks not overlap?

mmmPI
Filter Inserter
Filter Inserter
Posts: 456
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mmmPI »

mrvn wrote:
Thu Jul 11, 2019 1:53 pm
sparr wrote:
Sun Jul 07, 2019 11:44 pm
No, this mod abuses a bug where trains are only checked for collision if they are in the same rail block, and rail blocks only connect if the collision boxes for their rail entities overlap. So the bridge is actually two rail entities with collision boxes that don't overlap but otherwise do they jobs they need to. This bug was identified when someone found a combination of vanilla curved and straight rails that triggered it, and the devs chose to fix just that combination without eliminating the bug which made this mod possible. Hooray :)

This mod has no side effects with routing or signals or anything like that, so it's better than every other rail bridge mod in almost every way.
I wonder if you could make 2 sets of rails with their collision boxes set so the 2 rail types don't collide but still have the normal collisions inside the same set. Think rails on the ground and raised rails. Or would it be enough to make their collision masks not overlap?
What would you see on the map then ? how to tell the game which one is the elevated train that should be visible, and which one is the one that is the underground train that shouldn't even be drawn at all.

It seems to me that the the drawing of the rail is not done every tick if you don't move, but the drawing of the train is if the train moves. Which means if a train is to be drawn, it is most likely after the rails, and therefore "above/on top of it".

Maybe with a greyd/shadowy/transparent version of the train as if you were seeing behind something you could make the underground train collide visually with the elevated train without it being weird.
“In any field, the Establishment is seldom in pursuit of the truth, because it is composed of those who sincerely believe that they are already in possession of it.”
— Edwin Thompson Jaynes

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

Re: Rail bridge interchange with no shared track (rail bridges mod)

Post by mrvn »

mmmPI wrote:
Thu Jul 11, 2019 2:26 pm
mrvn wrote:
Thu Jul 11, 2019 1:53 pm
sparr wrote:
Sun Jul 07, 2019 11:44 pm
No, this mod abuses a bug where trains are only checked for collision if they are in the same rail block, and rail blocks only connect if the collision boxes for their rail entities overlap. So the bridge is actually two rail entities with collision boxes that don't overlap but otherwise do they jobs they need to. This bug was identified when someone found a combination of vanilla curved and straight rails that triggered it, and the devs chose to fix just that combination without eliminating the bug which made this mod possible. Hooray :)

This mod has no side effects with routing or signals or anything like that, so it's better than every other rail bridge mod in almost every way.
I wonder if you could make 2 sets of rails with their collision boxes set so the 2 rail types don't collide but still have the normal collisions inside the same set. Think rails on the ground and raised rails. Or would it be enough to make their collision masks not overlap?
What would you see on the map then ? how to tell the game which one is the elevated train that should be visible, and which one is the one that is the underground train that shouldn't even be drawn at all.

It seems to me that the the drawing of the rail is not done every tick if you don't move, but the drawing of the train is if the train moves. Which means if a train is to be drawn, it is most likely after the rails, and therefore "above/on top of it".

Maybe with a greyd/shadowy/transparent version of the train as if you were seeing behind something you could make the underground train collide visually with the elevated train without it being weird.
Both would be visible but have different graphics. I said "on the ground", not "in the ground". :)

The challenging part would be the raised rails. As the player should pass below them and probably shouldn't get hit by passing trains. The
simply Y ordering of drawing images won't work well with raised anything. It assumes everything stands on a flat surface.

Post Reply

Return to “Railway Setups”

Who is online

Users browsing this forum: No registered users