I have had trouble running the simulation myself so I hope someone has already wondered about that.
If I have 2 train stops with the same name and 2 trains that use that stop, assuming that all stops have the same priority and train limit of 2, when 1 of those stops is occupied by a single train (station is not full, because it has a limit of 2) can I assume the 2nd train will chose the empty station instead of the partially full one, or is it not guaranteed?
I am sure that the answer to that is somewhere on the wiki page, but I couldn't quite find it
Stopped trains effect on train stop selection
-
- Manual Inserter
- Posts: 2
- Joined: Fri Apr 04, 2025 3:48 pm
- Contact:
Re: Stopped trains effect on train stop selection
No, the train stop is either full or not. Which station the train goes to depends solely on which has lower pathfinding penalty.ShadowTheThird wrote: Fri Apr 04, 2025 3:57 pm can I assume the 2nd train will chose the empty station instead of the partially full one, or is it not guaranteed?
Re: Stopped trains effect on train stop selection
The short answer is no. If both stops are the same priority and have at least one slot available, then the train will always choose the closest stop to itself (as the crow flies, not track length, IIRC). Trains do not change which stop they are bound for when they repath along the way, and they do not take into account path penalties like stopped trains or red signals.
An easy way to create the behavior you want is to use a simple combinator to set the stop priority to 50 - number of trains read from the stop.
An easy way to create the behavior you want is to use a simple combinator to set the stop priority to 50 - number of trains read from the stop.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
-
- Manual Inserter
- Posts: 2
- Joined: Fri Apr 04, 2025 3:48 pm
- Contact:
Re: Stopped trains effect on train stop selection
Thanks for the help
I will be honest. I was fully prepared to setup an extensive circuits system that would check how many train stops are utilized and set the train limit from 1 to 2 to 3 accordingly, but messing with the priority is significantly easier lolrobot256 wrote: Fri Apr 04, 2025 4:19 pm The short answer is no. If both stops are the same priority and have at least one slot available, then the train will always choose the closest stop to itself (as the crow flies, not track length, IIRC). Trains do not change which stop they are bound for when they repath along the way, and they do not take into account path penalties like stopped trains or red signals.
An easy way to create the behavior you want is to use a simple combinator to set the stop priority to 50 - number of trains read from the stop.