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

Comments

@DorpsGek
Copy link

@DorpsGek 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

This comment has been minimized.

Copy link
Author

@DorpsGek 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

This comment has been minimized.

Copy link
Author

@DorpsGek 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

This comment has been minimized.

Copy link
Author

@DorpsGek 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
@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Jan 5, 2019

See also #7001

@andythenorth andythenorth added the stale label Jan 11, 2019
@J0anJosep

This comment has been minimized.

Copy link
Contributor

@J0anJosep J0anJosep commented Jan 12, 2019

This may be closed. #7009

@andythenorth

This comment has been minimized.

Copy link
Contributor

@andythenorth andythenorth commented Jan 12, 2019

Thanks @J0anJosep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.