Page 1 of 1

Train Routing Logic

Posted: Mon Jul 06, 2015 4:16 am
by kwstoudt
I would like to be able to tell a train which way to go (using signals or something) at intersections. Currently my trains will try to go through a station to get where they're going. I would like to be able to tell them to, rather than go through, to go around.

Image

In the picture above, a train going to a coal pickup stop will typically try to go through the train yard (red arrow). I would like to use a signal or something to tell it to go up and around the yard (green arrow) instead.

I have found topics similar to this, but nothing quite like it.

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 6:15 am
by deepdriller
Don't train signals already create a one-way rail wherever they are?

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 6:44 am
by ssilk
The way to make this is already the train path router.
Please could someone update this article: https://forums.factorio.com/wiki/inde ... th_finding

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 7:34 am
by sillyfly
I'm sorry ssilk, I don't think this idea is outdated. The current routing logic allows for adding such things, but they are not in the game.
I still think the game needs an explicit way for the user to manipulate the routing, be it in a vanilla entity or mod only, but AFAIK there is no way to add such a thing even in a mod.

What I'm talking about is a form of signal/sign to explicitly add routing cost to a piece of track - this should be pretty easy to implement if I understand the way the current routing algorithm works, and would allow for a lot of flexibility, while still allowing beginners to use the simple routing (that is - not use those signs).

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 2:26 pm
by kwstoudt
@deepdriller I'm not talking about one-way. I already have that. What I am talking about is that my coal train keeps going through my rail yard (which it is never supposed to do) to get to it's ore station and I want to make it go around.

@sillyfly I agree with what you are suggesting to fix this.

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 3:51 pm
by ratchetfreak
kwstoudt wrote:@deepdriller I'm not talking about one-way. I already have that. What I am talking about is that my coal train keeps going through my rail yard (which it is never supposed to do) to get to it's ore station and I want to make it go around.

@sillyfly I agree with what you are suggesting to fix this.
that may mean that there is a signal messed up somewhere

put the train on the roundabout going up just after it commits to going up and restart it, if it display "no path" then there is a signal issue

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 4:17 pm
by ssilk
sillyfly wrote:What I'm talking about is a form of signal/sign to explicitly add routing cost to a piece of track - this should be pretty easy to implement if I understand the way the current routing algorithm works, and would allow for a lot of flexibility, while still allowing beginners to use the simple routing (that is - not use those signs).
That is already implemented in 0.12. If you place for example an train stop it will significantly influence the routing. Every signal adds routing value. And it is dynamic: Stopped trains add routing values for example.
I don't see, why it will be needed and as ratchetfreak mentioned I also think this is a player issue, not a game issue.

I keep this in will not be implemented. If there are more concrete issues in 0.12 about this we can talk again.

Re: Train Routing Logic

Posted: Mon Jul 06, 2015 4:30 pm
by sillyfly
Ah, I hadn't realize in 0.12 individual signals will have routing cost. If that is indeed the case it is probably good enough.
Thanks for clarifying that.