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.
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!
Rail pathing - forcing my preferred pathing
Rail pathing - forcing my preferred pathing
- Attachments
-
- railway segment.png (688.1 KiB) Viewed 2516 times
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: Rail pathing - forcing my preferred pathing
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.
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.
Re: Rail pathing - forcing my preferred pathing
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.
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.
Re: Rail pathing - forcing my preferred pathing
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.
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.
-
- Filter Inserter
- Posts: 365
- Joined: Mon Jul 03, 2017 9:14 am
- Contact:
Re: Rail pathing - forcing my preferred pathing
When you're on 0.17 you can use stations as waypoints.
This way you can arrange your paths better.
This way you can arrange your paths better.