-
Notifications
You must be signed in to change notification settings - Fork 72
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
Significant difference between TryCalculateWeight results for contracted and non-contracted graphs #293
Comments
Update: The problem is related to the edge based graph
|
I was able to reproduce the problem on an even smaller network (just 3 vertices and 2 edges). See minimal-example.osm.pbf.zip |
Can the above code be used to reproduce with the tiny network? If not can you share the code used to compare the timings on the smaller network? My time working on this is limited but I'll try to have a look asap. Any info you can provide is useful, it looks like this is an issue specifically with the contracted edge-based network. Itinero will automatically create an edge-based contracted network if it encounters complex restrictions. |
@xivk Yes, the same code with
I also think it is an issue with edge-based contracted networks, but to tell the truth, I got lost in the graph representation and structures used in the algorithms, so I was unable to solve the problem myself. |
I am also experiencing this, See #281 |
I think this was somewhat fixed in #302. |
Triple confirmed, the lock issue seems to have fixed the route deviation! We are now analyzing to provide proof that the differences are with the multi threading, the way we are doing that is to analyze the points which are different and see if they are within the tolerances we provided to the engine. That would support why there were differences and where there were differences. I will see if I can provide you with some good examples once we have completed the 4th review tomorrow. |
I just noticed that your not using |
Unfortunately it doesn't seem to be fixed ... if I download source code form #302 and try to run code from #293 (comment) to reproduce the bug, I still get different results for contracted and uncontracted graphs.
|
Thanks, I will add a test for this when I can and attempt to debug further, sorry for the confusion. I have confirmed in parallel that my issues are gone however I am not using the |
I added the test case and verify I get the same results as you do. I will take a look and see if I can see anything which causes this. |
It seems like Also noting that |
@lukaskabrt, It seems the |
@xivk is it expected that the default weight handler would provide different results than that of the augmented? If not I can take a shot at trying to find out what the differences are there and making another PR |
@lukaskabrt, I think I was able to fix it. I updated #302 All unit tests are still passing and your test now passes as well. We will have to wait for @xivk to confirm but please do let me know if your still experiencing the issue and also do try the work around which is to use I am not sure if that code was supposed to be removed or if the logic in the We will have to wait for the author to confirm. |
It seems to be fixed for the minimal repro case. But if I use larger network from the first comment (https://github.com/itinero/routing/files/4061607/prague-small.osm.pbf.zip) the issue is still there. |
Have you also tried using the Can you share a test case for that issue and I will see what I can find. |
I haven't tried You can easily reproduce the issue with the source code from #293 (comment) and https://github.com/itinero/routing/files/4061607/prague-small.osm.pbf.zip file instead of |
I see so essentially just change the pbf file for the one linked instead of the minimal and I should be able to reproduce with the same test case? I will give it a try when time permits. Especially because I want to give the author a chance to take a look. In the meantime please do try If and when I find anything further I will let you guys know and thanks for your help! |
Yes, just change path to the other PBF file. |
I was unable to repo the problem using I also notice that |
There seems to be an issue with Addressed in #302 Please let me know if you find out different. @xivk please let me know if this is the appropriate fix |
I am using Itinero to calculate distance matrix among points and I have discovered, that in some cases there is a significant difference between results calculated using
RouterDb
with and without contracted graph. Tested on the latest stable version (1.5.0) and the latest pre-release version (1.6.0-pre19) with the same results.Code to reproduce the issue:
OSM file was downloaded from Geofabric a cropped with Osmosis.
It is also attached to this issue prague-small.osm.pbf.zip
I think, this is different issue then #267 because route is calculated correctly in both cases, there is just difference in weights returned by
TryCalculateWeight
The text was updated successfully, but these errors were encountered: