How do trains select stations?

Post all other topics which do not belong to any other category.
zigdon
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 17, 2016 8:57 pm
Contact:

How do trains select stations?

Post by zigdon »

I'm thinking of setting up all my resource outposts with a shared station name. I have a generic unload station, and would like to be able to just copy/paste the same train schedule to all trains.

The question is, how will trains select which station to go to?

Some ideas I was thinking of that might affect this:

- If I use signals to make a particular station inaccessible, would trains just try to go to other stations?
- If a signal changes while a train is in route to a station, will it redirect to another? Will it just sit at the signal and wait?
zigdon
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sat Sep 17, 2016 8:57 pm
Contact:

Re: How do trains select stations?

Post by zigdon »

The closest station that's routable? Or just all the trains will always try to go to the same station and queue up there?
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3717
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: How do trains select stations?

Post by DaveMcW »

Trains will recalculate their route if the current station becomes un-routable due to circuit signals.

A station blocked by another train is still routable, it just gets a distance penalty that makes it less likely to be the closest.

This means trains are biased towards the first station. They only try for other stations if the first station is busy when they choose a route.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: How do trains select stations?

Post by Yoyobuae »

You're asking for a ton of headaches.

Yes, in theory you can control where trains go by opening/blocking stations. In practice though it's almost impossible to guarantee the ENTIRE route to the desired target station will be open (no other trains in path!). Might work if you have a single train in your entire network, maybe.

And then you need to keep the distance (actually number of signals) to each potential destination balanced to some degree, otherwise trains will ignore all your red signals and go to nearer station anyway.
DaveMcW wrote:Trains will recalculate their route if the current station becomes un-routable due to circuit signals.
Signals don't make stations un-routable. They just add a distance penalty.

DaveMcW wrote:A station blocked by another train is still routable, it just gets a distance penalty that makes it less likely to be the closest.
Which together with this means that a train might very well route straight into a red light, if that route takes it to the nearer station. Train sees one closer station behind a red light (circuit forced) and some other further station behind a red light (due to other train), so it chooses the nearer one.
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: How do trains select stations?

Post by Deadly-Bagel »

Just thought I'd add that trains don't look at distance, they look at number of signals. It will prefer a train stop that is further away if there are fewer signals to pass than a closer stop.
Money might be the root of all evil, but ignorance is the heart.
Post Reply

Return to “General discussion”