Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pathfinding for automatic servicing #6551

Closed
DorpsGek opened this issue Apr 2, 2017 · 1 comment
Closed

Improve pathfinding for automatic servicing #6551

DorpsGek opened this issue Apr 2, 2017 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Apr 2, 2017

juanjo opened the ticket and wrote:

(r27830)
I attach 3 patches that try to improve pathfinding code for YAPF and NPF.

First patch:
Using a FindDepotData struct in yapf_rail makes code easier to read. It also avoids returning a fake distance, returning the real cost of the best path found.

Second patch:
Stop searching a depot if pathfinder reaches the maximum go to depot penalty. The "max_path_cost" variable was already implemented but was never used until now.

Third patch:
The patch applies the same strategy rail vehicles use when trying to find a depot for automatic servicing. It immediately leaves the search of a path when reaching the maximum penalty.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6551
@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 2, 2017

peter1138 closed the ticket.

Reason for closing: Duplicate

Of # 6476


This comment was imported from FlySpray: https://bugs.openttd.org/task/6551

@DorpsGek DorpsGek closed this as completed Apr 2, 2017
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant