-
Notifications
You must be signed in to change notification settings - Fork 376
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
fix(matrix-algorithms): Consistent use of maximum visited nodes limit #1428
fix(matrix-algorithms): Consistent use of maximum visited nodes limit #1428
Conversation
…rithms Apply the same limit on the number of visited nodes which is specified in the config file to all matrix algorithms.
@aoles thanks for implementing this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we should have an integration/unit test in place checking, checking for this exception to be thrown. What do you think?
…rithms Apply the same limit on the number of visited nodes which is specified in the config file to all matrix algorithms.
e1f8ec6
to
2ffe0ab
Compare
…tps://github.com/GIScience/openrouteservice into issue#1246-consistent_use_of_visited_nodes_limit
1ba6aac
to
e7bf917
Compare
@aoles Any progress so far or anything I could help with? |
…rithms Apply the same limit on the number of visited nodes which is specified in the config file to all matrix algorithms.
e7bf917
to
73c2284
Compare
Thanks @MichaelsJP , I'm good 😎 Implementing reasonable unit tests turned out to be more effort than originally anticipated as the tests actually revealed some issues with the current implementation 🙈 Addressing these required some smart restructuring of existing methods and classes, that's why it took a bit longer. But I'm basically done now, just going through the introduced changes the last time before pushing to make sure nothing breaks 🤞 |
…tps://github.com/GIScience/openrouteservice into issue#1246-consistent_use_of_visited_nodes_limit
Restructuring of the original implementation was neccassary in order to address some of the issues revealed by the unit tests and for the sake of reducing complexity and redundancy.
Unit test for exceeding the maximum number of visited nodes in RPHAST and Core matrix algorithms are now in. Regular Dijkstra matrix algorithm is currently not covered by any unit tests at all. I will look whether we could have at least an API test for it. I believe an additional integration test apart from the unit tests makes sense anyway. |
…rithms Apply the same limit on the number of visited nodes which is specified in the config file to all matrix algorithms.
Restructuring of the original implementation was neccassary in order to address some of the issues revealed by the unit tests and for the sake of reducing complexity and redundancy.
48f01e9
to
1d8fbf2
Compare
…tps://github.com/GIScience/openrouteservice into issue#1246-consistent_use_of_visited_nodes_limit
Took the opportunity to refactor the test class a bit for the sake of DRYness.
@MichaelsJP With the API test in place, I think we are good to go now! 🚀 |
Apply the limit on the number of visited nodes which is specified in the config file to all matrix algorithms.
Pull Request Checklist
have been resolved.
[Unreleased] heading.
along with a short description of what it is for, and documented this in the Pull Request (below).
(at least Germany), and the graphs build without problems (i.e. no out-of-memory errors).
importer etc.), I have generated longer distance routes for the affected profiles with different options
(avoid features, max weight etc.) and compared these with the routes of the same parameters and start/end
points generated from the current live ORS.
If there are differences then the reasoning for these MUST be documented in the pull request.
and why the change was needed.
Fixes #1246.
Information about the changes
Key functionality added: Enforce
maximum_visited_nodes
limit specified in the config file.Reason for change: The limit was not respected at all by RPHAST matrix algorithm, and not handled properly by CoreMatrix either.
Examples and reasons for differences between live ORS routes, and those generated from this pull request
Some more complex long-distance matrix queries computed with either RPHAST or CoreMatrix which have been working before might start failing with the following error:
This can be circumvented by increasing the
maximum_visited_nodes
limit if server resources allow it.