Train queuing and station preference
Posted: Wed Nov 16, 2022 3:42 pm
I was creating a setup for processing ore and encountered an interesting behaviour.
Lets first discusss the unloading.
I have following setup:
As you can see I have waiting stations which are also used to load the trains with iron ore for testing (All named Load) and 3 unload stations (All named Unload). Unload stations have disabled train limit.
All trains have a schedule to go to fully load at Load and then unload at Unload.
When I left this setup going i noticed at first trains prefer to go to empty stations, then to those with no train waiting and then they stay before the
chain signal. This is interesting, because that means the train at chan signal wants to go to the left most station (red 1).
Now the question is why did it choose the left one and not any other.
I had these ideas:
1) Every station has its internal ID and red 1 is first in some list
2) It is the closest one to the train
3) It is decided by position of the station in world, so maybe it depends on some ID of the chunk it is placed in
1) is not true, because when I delete the stations and rebuild them in any order it doesn't change the behaviour.
Now this is my loading setup at the end of the pocessing:
Which means that 2) is also not true, because here it also prefers station on the left.
Only remaining idea is 3), but I somehow doubt that trains would decide by that. Yet it sems to corelate with the behaviour.
So does anybody know, how do trains choose to which station they'll go if there are multiple with the same name and all of them have the same number of trains going to them?
Maybe it can be somehow managed using circuits network?
Anyway what I would like to achieve is this:
Lets first discusss the unloading.
I have following setup:
As you can see I have waiting stations which are also used to load the trains with iron ore for testing (All named Load) and 3 unload stations (All named Unload). Unload stations have disabled train limit.
All trains have a schedule to go to fully load at Load and then unload at Unload.
When I left this setup going i noticed at first trains prefer to go to empty stations, then to those with no train waiting and then they stay before the
chain signal. This is interesting, because that means the train at chan signal wants to go to the left most station (red 1).
Now the question is why did it choose the left one and not any other.
I had these ideas:
1) Every station has its internal ID and red 1 is first in some list
2) It is the closest one to the train
3) It is decided by position of the station in world, so maybe it depends on some ID of the chunk it is placed in
1) is not true, because when I delete the stations and rebuild them in any order it doesn't change the behaviour.
Now this is my loading setup at the end of the pocessing:
Which means that 2) is also not true, because here it also prefers station on the left.
Only remaining idea is 3), but I somehow doubt that trains would decide by that. Yet it sems to corelate with the behaviour.
So does anybody know, how do trains choose to which station they'll go if there are multiple with the same name and all of them have the same number of trains going to them?
Maybe it can be somehow managed using circuits network?
Anyway what I would like to achieve is this: