Train question

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
qofabogi
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Mar 17, 2022 7:05 am
Contact:

Train question

Post by qofabogi »

Hello.
Trying to iron out my train issues, and wanted to make sure my undertsanding of the mechanics was accurate. Is this corect?
A train with a disabled station in the schedule will skip that station and head for the next station in the list. If there are no other stations, it'll remain where it is and say 'No destination'. If it's already enroute and the station it's headed to becomes disabled, it'll skip the station and repath to the next station, or stop right where it is if there are no other stations.
A train with a station with a limit set to 0 (or less than the number of trains already headed there) will wait where it is for the station to open (by the limit raising back above number of trains headed there). If the train is already enroute to the station, it'll continue as pathed to the station and then continue the schedule normally.
Is this accurate? Most of it I'm pretty sure about - the kicker for me is behavior when a train has a limit set to 0 in a list with multiple stations; I had thought it would skip the station, but if what I read today is true it'll instead wait for the station... do I have that right? And is behavior when limit is set to 0 the same as when the limit for a station is exceeded (say, a station with a limit of 1 that already has a train there)?


here my lovely sites:
https://freelivesexcams.me/
https://freecams.name/
https://freesexcams.name/
Last edited by qofabogi on Mon Jun 20, 2022 9:54 am, edited 1 time in total.

Nidan
Fast Inserter
Fast Inserter
Posts: 225
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Train question

Post by Nidan »

Looks like your understanding is correct, except for the generalization to multiple destinations with the same name (or I simply misunderstood what you wrote).

A schedule entry will be skipped if, and only if, ALL stops with that name are disabled. If the train is already moving, it will stop dead at its current position if all stops of all schedule entries become disabled or unreachable ("No path").

A schedule entry will be waited for if, and only if, ALL enabled stops with that name have hit or exceeded their limit or are unreachable. If the train is already moving and the limit if the targeted stop gets reduced, it will try to path to another stop with the same name, but continue moving towards the current stop if no alternatives can be found continue moving towards the current stop. A train will never stop due to the limit.
Last edited by Nidan on Fri Mar 18, 2022 3:28 pm, edited 1 time in total.

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Train question

Post by disentius »

Nidan wrote:
Thu Mar 17, 2022 10:34 am
...
A schedule entry will be waited for if, and only if, ALL enabled stops with that name have hit or exceeded their limit or are unreachable. If the train is already moving and the limit if the targeted stop gets reduced, it will try to path to another stop with the same name, but continue moving towards the current stop if no alternatives can be found. A train will never stop due to the limit.
This is not correct. If a train is moving to a stop, it has a reservation. if you reduce the limit after it left the source station, it will continue to its reserved station.

Nidan
Fast Inserter
Fast Inserter
Posts: 225
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Train question

Post by Nidan »

disentius wrote:
Fri Mar 18, 2022 2:55 pm
Nidan wrote:
Thu Mar 17, 2022 10:34 am
...
A schedule entry will be waited for if, and only if, ALL enabled stops with that name have hit or exceeded their limit or are unreachable. If the train is already moving and the limit if the targeted stop gets reduced, it will try to path to another stop with the same name, but continue moving towards the current stop if no alternatives can be found. A train will never stop due to the limit.
This is not correct. If a train is moving to a stop, it has a reservation. if you reduce the limit after it left the source station, it will continue to its reserved station.
After rereading FFF 361, you're right. Looks like I've missed that detail.
There is an edge case we had to solve while working on the feature, what happens if the limit is lowered while a train is already on the way? Our first idea was to force all the trains that are on the way, to repath and find a new destination. [...]

So we decided that even if the limit is changed, any trains with a reservation will still go there.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 472
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: Train question

Post by SoShootMe »

Nidan wrote:
Fri Mar 18, 2022 3:25 pm
After rereading FFF 361, you're right. Looks like I've missed that detail.
There is an edge case we had to solve while working on the feature, what happens if the limit is lowered while a train is already on the way? Our first idea was to force all the trains that are on the way, to repath and find a new destination. [...]

So we decided that even if the limit is changed, any trains with a reservation will still go there.
In other words, nothing happens directly because of the train limit of the stop a train was heading to being lowered. But a repath can be triggered by something else (see the Wiki), and then...
boskid wrote:
Fri Oct 09, 2020 6:43 am
At this point reservation for the old target (or first waypoint) is stashed, and when possible targets list is created, train stop even when being full will still be returned as valid target if the train has a stashed reservation for it.
In effect, a train that repaths ignores the train limit of the stop it was heading to, but the target will change if there is a better (lower path cost) one available (enabled, below train limit, reachable).

User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: Train question

Post by disentius »

yep:) And the calculation is a bit different too. shortest distance "as the crow flies"

Post Reply

Return to “Gameplay Help”