## Trainlimitation for stations - Priorities

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Premu
Long Handed Inserter
Posts: 74
Joined: Wed Nov 13, 2019 4:40 pm
Contact:

### Trainlimitation for stations - Priorities

For my new base I want to use the trainlimit mechanics. One thing I don't fully comprehend right now are which stations are chosen if there is more than one available.

Case 1: There are three stations with the name "Copper - Loading". Let's call them A, B and C. One train wants to move to Copper - Loading
A is closest to the train. It has a train limit of 2, one spot is already reserved.
B is further away. It has a train limit of 4, one spot is already reserved.
C is even further away. It has a train limit of 2, both of them are free.

What has priority here? The distance, favoring station A? The amount of free spots, favoring B? Or an equal distribution of trains, favoring C?

Case 2: Three trains are waiting at the three different "Copper - Loading" stations, waiting for a free spot. Now one train leaves "Copper - Dropoff", so one of the three can drive off.
At A one of the available spots is reserved, at B three of the available spots are used and at C both available spots are used. The distances are the same as in the first case.

Now, from which station a train will be chosen?

Zanthra
Fast Inserter
Posts: 206
Joined: Fri Mar 25, 2016 8:18 am
Contact:

### Re: Trainlimitation for stations - Priorities

I can say with confidence that case 1 will always go to the closest station (in terms of path distance counting the pathfinding penalties).

Case 2, I don’t know, and could only speculate, but trains limit only has an affect on what stations are valid destinations, the trains limit and in particular the number of free or used slots will not affect which train fills the open slot.
Last edited by Zanthra on Sun May 16, 2021 11:55 am, edited 1 time in total.

Amarula
Filter Inserter
Posts: 383
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

### Re: Trainlimitation for stations - Priorities

When I have multiple trains waiting for a spot to open, I have observed that they appear to queue up, so the first train that was ready to leave is at the front of the queue, and is the first to be given an opening, thus FIFO.
Luck is not a robust control.