Train path check on Intersections

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
Nubm2
Inserter
Inserter
Posts: 45
Joined: Sat Mar 26, 2016 11:37 am
Contact:

Train path check on Intersections

Post by Nubm2 »

Hello! o/

I wonder if it is possible to alter (or extend) path finding of trains to behave more "smart" on intersections. What i mean is, when a train approaches an complex intersection, it locks all in-going traffic, regardless if paths would be occupied by the approaching train path or not (you can see the path while sitting in the train). But what if a second train would approach the intersection and simply checks if the path of the intersecting train is connecting in any way with its own path. If not, the signal would be blue for the second train and it would be allowed to enter the section.
This would drastically speed up traffic. Not only can multiple trains use the same intersection at once, they wouldn't need to stop and accelerate again.
This could make a great (and long overdue) train upgrade as well.

It would also open up smaller trains as an valid alternative to belts in mid range scenarios. As of now, any intersection slows down traffic by an insane and unnecessary amount (because small trains are fast and the distances would be small).

I'm well aware that it is possible to create workarounds for this problems (which i really enjoy). However, it would still be challenging to create networks that make smart use of a feature like that.

[What i am also miss is a checkpoint signal that acts like a train station but does not require the train to stop. Just to force trains into certain paths.]

Any thoughts?

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

Re: Train path check on Intersections

Post by DaveMcW »

This is exactly what chain signals do. Break up your intersection into tiny blocks with chain signals, and a train will only reserve the blocks it needs. (You could also do it with normal signals, but then the train will sit in the middle of the intersection if it has a partial path).

User avatar
Nubm2
Inserter
Inserter
Posts: 45
Joined: Sat Mar 26, 2016 11:37 am
Contact:

Re: Train path check on Intersections

Post by Nubm2 »

Image


Whenever i try to put chain signals in between they just start flashing on every position. As said, this setup uses a lot of smaller supportive trains from and to smelters, reloading stations, in- and outputs around the base for mid and short range transportation. Other approaches do work, but this was more a technical question because even trains passing each other on opposite rails would force one of them to stop regardless.
So the idea was to check for path intersection on occupied blocks to increase traffic flow, not how to work around this specific problem or build bigger intersections.
This was moved rather quickly to gameplay help, and since i am no programmer i assume it is a stupid question. I wouldn't know so i apologize.

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

Re: Train path check on Intersections

Post by DaveMcW »

Your intersection is too crowded to fit all the chain signals it needs. The only solution is to make it bigger and more spaced out.

Skeletpiece
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Sat Jul 08, 2017 6:26 pm
Contact:

Re: Train path check on Intersections

Post by Skeletpiece »

I would delete everything inside the roundabound. You are duplicating routes and creating more problems. Instead of creating more intersections, try to divide the already created exits from the roundabound (I would keep just 4, then divide those)

Recommendation: Keep it simple !
Roundabound.gif
Roundabound.gif (5.84 MiB) Viewed 3249 times

Mr. Tact
Filter Inserter
Filter Inserter
Posts: 460
Joined: Sat Mar 26, 2016 3:37 pm
Contact:

Re: Train path check on Intersections

Post by Mr. Tact »

Haha, that is a great intersection.... for all the wrong reasons. :mrgreen: As stated, you need to simplify.
Professional Curmudgeon since 1988.

User avatar
Nubm2
Inserter
Inserter
Posts: 45
Joined: Sat Mar 26, 2016 11:37 am
Contact:

Re: Train path check on Intersections

Post by Nubm2 »

The thing is, since all trains had to stop anyways i wanted to create the fastest possible route to save some time. That was the only way i could come up with to further tune the network. On the plus side, i never ever have deadlocks, no matter how many trains i send in.
Its not a real problem anymore now that i have switched to dedicated reloading/smelting areas on this map.

@Skeletpiece, since all trains are taking a right turn all the lamps are yellow. But i assume if one of them would go straight the first chain light it encounters would be blue and the train would stop before entering the intersection, right?
And what to do when i want to add additional tracks to that ring, i just make one corner larger until i can put in another chain light in between the new fork?
Did you ever had any deadlocks in this setup? What would happen if all trains are going straight? (W->E, N->S etc.)
And may i ask you to go a little bit into detail about the setup? Its really hard to see on that gif.

But thanks for the replies, I'll take a look at those as soon as possible (HDD crashed, waiting for the new one to arrive).

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Train path check on Intersections

Post by Zavian »

Nubm2 wrote:
Sat Jan 05, 2019 8:56 pm
The thing is, since all trains had to stop anyways i wanted to create the fastest possible route to save some time.
That intersection you pictured is one giant block. That means it can only contain one train at a time. If you can separate the different routes into different blocks, you can have 2 (or potentially more) trains in the intersection at a time. eg an eastbound and a westbound train can both proceed straight through at the same time. That potentially doubles throughput.

viewtopic.php?f=194&t=46855 contains a collection of 4-way junctions. A medium throughput 2 track junction can do around 40 trains per minute. (The highest throughput 2 track junctions are huge, but can do 90 trains per minute). Even a simple roundabout (eg the one skeletpiece pictured) can do around 30 trains per minute.

User avatar
Nubm2
Inserter
Inserter
Posts: 45
Joined: Sat Mar 26, 2016 11:37 am
Contact:

Re: Train path check on Intersections

Post by Nubm2 »

OK, i get it now. The idea i proposed was not only stupid but also outdated. Should read the forums and patch notes more often.

So i just intersect with chain signals and do not worry about train length as long as there is a chain signal at the entry and a rail signal at the exit of the intersection.

Thanks for the help! o/

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Train path check on Intersections

Post by Zavian »

You do need to worry a little about train length. The train needs to fit in the exit block after the intersection, otherwise it might not clear the intersection.

For a more detail see viewtopic.php?f=194&t=18621.

Post Reply

Return to “Gameplay Help”