-
-
Notifications
You must be signed in to change notification settings - Fork 874
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
Add #6410: [YAPF] Use a max penalty for finding the nearest road vehicle depot #6929
Add #6410: [YAPF] Use a max penalty for finding the nearest road vehicle depot #6929
Conversation
Implemented a maximum path cost penalty when searching for the closest road vehicle depot for YAPF
What does this solve? |
Apparently it changes nothing, but makes the pathfinder quit earlier if it goes past the max_penalty. Seems that the penalty is only used for automatic servicing. Manual sending to depot still uses unlimited penalty. |
@SamuXarick Yes, it leaves earlier and the max_distance penalty is used. For consistency, either max_distance should be used or removed from the code. I forgot to add a patch for it, but I wrote them two years ago (YAPF and NPF): Anyway, I don't see why a change in max_distance is needed. |
Because OpenTTD/src/pathfinder/yapf/yapf.h Lines 62 to 70 in 25a060b
Oh, I did that for NPF too, included it in my other patch request #6928 |
In the file you referenced, both max_distance and max_penalty are used and their meaning is the same. It is explained in the comments. If it is an inconsistency, it shouldn't be dealt here but in a separate commit. |
We recently switched from Jenkins as CI to Azure Pipelines as CI. This means you need to rebase before this Pull Request will pass its checks. Sorry for the troubles! |
Same issue is addressed by #7009, which is merged. |
Implemented a maximum path cost penalty when searching for the closest road vehicle depot for YAPF
#6410