I have built a personal train with a very long round track. It sometimes does not choose the shortest track to the right side or even worse, it goes all the way around if it only have to drive 3 meters in the other direction.
No signals at all, yet.
Reproduce: enter the train, hold ctrl and choose various locations near you
[kovarex] [0.17.16] Doubleheaded Train does not choose shortest track
-
- Fast Inserter
- Posts: 127
- Joined: Fri Sep 14, 2018 2:06 am
- Contact:
- TruePikachu
- Filter Inserter
- Posts: 978
- Joined: Sat Apr 09, 2016 8:39 pm
- Contact:
Re: [0.17.16]Doubleheaded Train does not choose shortest track
Are there regular train stops in place?
-
- Fast Inserter
- Posts: 127
- Joined: Fri Sep 14, 2018 2:06 am
- Contact:
Re: [0.17.16]Doubleheaded Train does not choose shortest track
So I noticed something on your picture: you were inside the right-headed locomotive, and you ctrl-selected somewhere to the left of your train. I think because you are on the right-headed locomotive, the game sees that and decides to default the starting direction rightward. I suspect if you were on the other locomotive the train would start as you have wanted it to.
Re: [0.17.16]Doubleheaded Train does not choose shortest track
I was using a signaled stacker as a test with 2-headed train, it always went the shortest path. I actually thought for a moment that the bug was real until i realized my home station had no entrance from both lanes.
Re: [0.17.16]Doubleheaded Train does not choose shortest track
The issue here is obviously about station direction. Every station has its direction on track so the train will not "reverse" to it no matter if it has backwards facing locomotive or not.
So I suppose the "temporary station" which is added to the train schedule also does have the direction which is set incorrectly in this case forcing train to follow longer route to approach the station from another side. I am also not sure if current movement direction of the train also effects the choice .
So I suppose the "temporary station" which is added to the train schedule also does have the direction which is set incorrectly in this case forcing train to follow longer route to approach the station from another side. I am also not sure if current movement direction of the train also effects the choice .
Re: [0.17.16]Doubleheaded Train does not choose shortest track
PacifyerGrey wrote: ↑Fri Mar 22, 2019 8:48 am The issue here is obviously about station direction. Every station has its direction on track so the train will not "reverse" to it no matter if it has backwards facing locomotive or not.
That will only be true if the train's schedule is not empty, but in the screenshot it is. So it's not trying to go to a station, just any plain location on tracks.
But if there is 1 station on the tracks it might already determine which direction the rail goes, same as signals.
Re: [0.17.16]Doubleheaded Train does not choose shortest track
Stations do not effect rail direction. You can have any amount of differently oriented stations between destinations.
The only issue is that every station adds 2000 tiles penalty to a path going through it so visually longer path may be considered actually shorter from a pathfinder standpoint.
Actually this penalty might be the real issue in the OP situation.
Re: [kovarex] [0.17.16] Doubleheaded Train does not choose shortest track
Thanks for the report, it is now fixed for 0.17.22
This is kind of a special case (also treated by special logic), when the search is within a single segment. And since all the rail loop has no signal or junction, it is a single rail segment.
The logic now basically selects the shorter path within the segment instead of choosing whatever comes first.
This is kind of a special case (also treated by special logic), when the search is within a single segment. And since all the rail loop has no signal or junction, it is a single rail segment.
The logic now basically selects the shorter path within the segment instead of choosing whatever comes first.