[0.17.58] The train incorrectly calculates the route.

Bugs that are actually features.
Post Reply
MOHAPX
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 29, 2019 7:51 pm
Contact:

[0.17.58] The train incorrectly calculates the route.

Post by MOHAPX »

The train travels from station A to station B.
If there is a station on the way of the train, then the train does not pass this way, but always takes a detour. But if there is no other way, then the train travels through the station. Why can't the train pass through station C if this route is shorter?
It is necessary to do it - if station C is turned off, then it would not interfere with the passage of the train.
2019-07-23_08-53-25.png
2019-07-23_08-53-25.png (1.51 MiB) Viewed 1529 times
2019-07-23_09-02-22.png
2019-07-23_09-02-22.png (1.31 MiB) Viewed 1529 times
2019-07-23_09-02-28.png
2019-07-23_09-02-28.png (1.29 MiB) Viewed 1529 times

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [0.17.58] The train incorrectly calculates the route.

Post by boskid »

Not a Bug
https://wiki.factorio.com/Railway/Train_path_finding wrote:When the path includes a train stop that is not the destination -> Add a penalty of 2000.
For pathfinding, because of penalty of train stop not in path, longer path is "better"

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1150
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: [0.17.58] The train incorrectly calculates the route.

Post by valneq »

I think the idea behind the panalty for train stops is the following:

If your train takes a path where it traverses a train station, but for whatever reason has to stop along the way at some red signal, your train could possibly block the entrance/exit of that train station. As a consequence, another train that tries to get to that train station cannot access it -- and everything because your first train decided it was more important to save some fuel by taking a slightly shorter route.

Loewchen
Global Moderator
Global Moderator
Posts: 8320
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.17.58] The train incorrectly calculates the route.

Post by Loewchen »

As has been said, this is working exactly as it should. Check out the wiki for pathfinding details.

MOHAPX
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Mar 29, 2019 7:51 pm
Contact:

Re: [0.17.58] The train incorrectly calculates the route.

Post by MOHAPX »

If the station is turned off, the train will not go to it, therefore you can use this route for the train. Is not it logical?

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.58] The train incorrectly calculates the route.

Post by posila »

Disabled station may become enabled and another train might stop in it for undetermined length of time; so stations on path have fixed penalty for pathfinding regardless of their current state.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2747
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: [0.17.58] The train incorrectly calculates the route.

Post by mmmPI »

You can put a station on the long path too to equalize the penalty if the behavior is annoying you.

Post Reply

Return to “Not a bug”