Repository navigation
Speed up CH for foot - #2514
Merged
Merged
Speed up CH for foot#2514
Conversation
Member
|
Thanks a bunch for this work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2507.
After lots of experimenting I arrived at a version that works well for car and foot (and country_rules as well) using default parameters (the same for both profiles). I still use neighbor updates as in #2491, because this allows reducing the shortcut numbers, but I went back to adjusting the maximum number of settled nodes based on the mean degree of the graph instead of keeping it constant throughout the entire preparation. The factor that is used to determine the number of maximum number of settled nodes from the mean degree is now a tuning parameter (actually two: one for priority calculation and one for the contraction). There is also another new parameter that allows limiting the number of neighbor updates per node.
To benchmark my results I used this commit: 7082297, so just before #2491. I got this:
t_totalis the CH preparation time in seconds,shortcutsthe number of created shortcuts andquerythe average query time using random queries in Bavaria in ms.For this branch I got for car/planet (I copied the benchmark data from above for better readability)
and for foot/planet:
We see that for both the
footandcarprofile the preparation time is faster, the shortcuts are less and the query time is either about equal or slightly faster, depending on the new parameterneighbor_maxthat I set to2and5here.For Europe the new branch also works better:
Using
neighbor_maxwe actually can choose between faster preparation, less shortcuts and faster queries. For now I choseneighbor_max=2as default.Including country rules (for Germany), c.f. #2375, I get this:
before:
after:
Also here we get less shortcuts and a faster preparation time than before without slowing down the queries, no matter whether country rules are enabled. The
GermanyCountryRulestill does slow down the preparation by around 50%. This can be improved by decreasing the maximum poll factor for contraction (mpf_contr). Note howt_contrgoes down from around 97s to 61s while the number of shortcuts goes only slightly up (~1%)