Rail pathing - forcing my preferred pathing

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
inick
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Jun 16, 2016 7:36 pm
Contact:

Rail pathing - forcing my preferred pathing

Post by inick »

Greetings engineers.

I am trying to create a rail segment that will prioritize a line over another, which means I should add a penalty (but not block) the other rail going in the same direction. The idea is the inner two rails on a 4-rail spot, the inner two rails are prioritized and treated as a basically freeway, and the outer lanes would be treated as your roadway traffic exit or onramp lines.
Image


Since I have to have a full length set of rails for your exit/onramp lanes in addition to the freeway lanes, the pathing will consider them equal until a corner (in which I've already got that sorted..I think). https://wiki.factorio.com/Railway/Train_path_finding was very useful in telling me what penalties I can add. I'd rather not have a pair of useless train stops at every stretch to skew the preference. I have more signals on the exit/onramp than on the freeway lanes. Any way I can add score by signals alone (game option?)? Any other way I could prefer the inner two lanes OTHER than wasteful items that don't get used?


Thanks for any suggestions!
Attachments
railway segment.png
railway segment.png (688.1 KiB) Viewed 2169 times

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

Re: Rail pathing - forcing my preferred pathing

Post by slippycheeze »

If access to the turn-out is only possible from the outer lane, perhaps you could add a circuit controlled signal to the track: keep it red, which adds a 1000 tile penalty to using those tracks. That would strongly discourage any train from taking that path if there was another option available - and I think you could stack them to get as high a penalty as you wish.

Place another signal, not controlled, for when something turns in and use that to let those go green so it can proceed, and you have a system that will let through any train that decides the outer track is worth it ... but where the trains will only decide that if they really can't do anything else.

Fancier sensors from mods might improve the structure, but the vanilla signals send state that you could use to detect "train in this block" before they reached the red ones. Put those "don't go here" signals far enough away and you shouldn't even slow down the train. :)

You could even circuit-control a red behind the "permitted" train to stop any other train making a snap decision for the outer lane while the "go ahead" was given and the track was open. Repeat the signals as frequently as needed.

inick
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Jun 16, 2016 7:36 pm
Contact:

Re: Rail pathing - forcing my preferred pathing

Post by inick »

slippycheeze,

Thanks for the time to respond. At the time I posted this, I had just finished with some manually controlled (constant combinator) regular signals, which blocked all trains from going through. It may have also added 1000 penalty, but prevented a train from going past it. The path itself was very clear (not automated routes yet). When this detail from the wiki didn't work, I was out of ideas and posting.

So I still don't see a way to do this without clutter of train stops...

I'll keep working on my layout. Still open to smart ideas. Cheers.

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

Re: Rail pathing - forcing my preferred pathing

Post by mrvn »

Using a constant combinator won't work. You need to place 2 signals and connect them with a wire. The first signal you set to just read out its status and the second you enable when "green = 0". When a train takes the path through the signals it will reserve the first signal and it turns yellow. That then causes the second signal to turn green and the train can pass through without even slowing down.

If you place such a pair every now and then on the slow lane then this will push trains into the fast lane unless they have to remain on the slow lane. They will also remain on the fast lane as long as possible since switching back to the slow lane means crossing those red signals.

JimBarracus
Filter Inserter
Filter Inserter
Posts: 365
Joined: Mon Jul 03, 2017 9:14 am
Contact:

Re: Rail pathing - forcing my preferred pathing

Post by JimBarracus »

When you're on 0.17 you can use stations as waypoints.

This way you can arrange your paths better.

Post Reply

Return to “Gameplay Help”