-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
bug-fix: invalid contract node #7066
base: master
Are you sure you want to change the base?
bug-fix: invalid contract node #7066
Conversation
requires a formatting change for CI to proceed:
|
@DennisOSRM Thanks for your kindly reply, I just fixed the format issue, plz have a look again |
Still failing. Please have a look at the failing test output. |
@DennisOSRM . I've run on ubuntu with docker and passed the pre-push hook. plz check again. sry to bother you again |
@DennisOSRM thank you. all checks passed, could you review this PR? is it ok to merge? |
I plan to review over the weekend. |
Issue
To fix issue #7054
Currently, in OSRM CH algo, the graph contract node and search routes update the weight of each edge. OSRM uses filters to exclude some specific roads with tags like toll, ferry, etc. In the function
contractExcludableGraph
, if filters are more than 1, OSRM will first contract a non-core graph and contract a corresponding graph of each filter. However, the weight update process uses all edges to search routes and doesn't consider that we can not use edges that should be excluded. This will lead to no route found issue when using theexlclude=toll
, addressed in #7054.In that case, node
3
has 2 alternative routes to node7
, while 3->1->0->6->7 is faster than 3->2->0. When OSRM wants to contract node2
, edge (3,2), (7,2) are deleted and no shortcut is inserted, because 3->1->0->6->7 is the actualshortcut
(shorter than 3->2->0). However, updating the route weight doesn’t consider whether node0
or1
or others are accessible in this filtered graph. So I try to pass the arraycontractable
into functionrelaxNode()
, if a finding node is inaccessible, we shouldn’t insert this node into the searching heap or update the weight.Notice: this change will leave more edges in graph and enlarge the memory usage, but I think it's worth it.
I'm not sure this is the best way to fix it. Waiting for your feedback, and appreciate it in advance.
Please read our documentation on release and version management.
If your PR is still work in progress please attach the relevant label.
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?