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

Suggested changes for pathfinding for automatic servicing #6476

Closed
DorpsGek opened this issue Jun 5, 2016 · 6 comments
Closed

Suggested changes for pathfinding for automatic servicing #6476

DorpsGek opened this issue Jun 5, 2016 · 6 comments
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 stale Stale issues

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jun 5, 2016

juanjo opened the ticket and wrote:

I saw several things in YAPF and NPF that in my opinion can be improved:

  1. Using a FindDepotData struct in YAPF makes code more readable.
  2. NPF doesn't use the max_distance provided when looking for a RAIL OR ROAD depot for automatic servicing. The code included the option of using it, but the pathfinder didn't get the value of the max_distance to look ahead.
  3. YAPF doesn't use the max_distance provided when looking for a ROAD depot for automatic servicing.

See attached patches.

Attachments

Reported version: trunk
Operating system: All


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

DorpsGek commented Apr 3, 2017

peter1138 wrote:

The first patch seems to impact trains finding depots. Ran a quick test with a savegame and found that the results (and therefore vehicleenterdepot() calls eventually) are different. Reading the patch, I can't immediately see why...


This comment was imported from FlySpray: https://bugs.openttd.org/task/6476#comment14411

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 3, 2017

peter1138 wrote:

Okay, seems to be an existing bug. Despite setting max_penalty the pathfinder can still return a tile that is beyond the limit. Because currently the find depot code ignores the actual distance and uses a fake value, the fact that the destination is out of range is ignored.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6476#comment14412

@DorpsGek
Copy link
Member Author

DorpsGek commented Apr 4, 2017

peter1138 wrote:

First part has been added. I found 2 other bugs due to it...


This comment was imported from FlySpray: https://bugs.openttd.org/task/6476#comment14416

@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
@frosch123 frosch123 removed the Core label Apr 14, 2018
@andythenorth
Copy link
Contributor

See also #7001

@andythenorth andythenorth added the stale Stale issues label Jan 11, 2019
@J0anJosep
Copy link
Contributor

This may be closed. #7009

@andythenorth
Copy link
Contributor

Thanks @J0anJosep

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 stale Stale issues
Projects
None yet
Development

No branches or pull requests

4 participants