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
Mismatch between /route and /sources_to_targets APIs for "auto" costing model #4622
Comments
I have a similar problem. On the new version, approximately 1-2% of stops (US) are not available when calculating the matrix. But they are available when make a single route. I can provide specific examples if needed. |
I did a LOT of work recently on that algorithm (full refactor, lots of new features) and it's totally possible that some edge cases are screwed up. I'm still in the process of more enhancements, I might look into this before digging any possible hole even deeper. Can you somewhat pinpoint when things started not working? What was the "version" (probably commit?) you were using before? |
Sorry but I couldn't determine the version, we are using gis-ops docker valhalla image since October 10, 2023. Everything worked well in this version. About a month ago we decided to upgrade, installed the latest version on the new server and started having problems with it. |
Dates are even better. That was before most of the work I did I think. But it'll still be easy to replicate, the OP has very minimal examples. I'll get to that tmrw hopefully. |
found the problem: your set of coordinates wants to get from a road onto a parking area in front of a supermarket or so. the problem is that the way leading onto the parking area is tagged with however, we do allow routing over destination-only edges in a second pass (which is why routing those works). recently I added that ability to the CostMatrix algorithm as well, so if you put do note, this is a mapping error, valhalla is doing the right thing here.
|
do feel free to post other matrix requests which are failing with that config option and we'll re-open here. I probably changed smth while doing the big CostMatrix refactor. sounds like it's now doing the right thing though. |
hm, I kinda question the "right thing" in how we handle destination-only. we also have a (undocumented) request option to penalize those edges. I wonder if the penalty (default 10 mins IIRC) is not enough and we could actually allow them on a first pass as well? I think @dnesbitt61 was questioning that too somewhere sometime. what do you think @kevinkreiser ? |
@nilsnolde Thanks a lot for your help! I changed the config option and now it works. Will this have a significant impact on slowing down performance? or any other qualities of work? I have another example in suburban area, that worked in the previous version, but does not work in the new one. I also began to notice an error in the logs when building a route between these points: Is it related to the same problem? This is a very trivial route. |
"trivial" routes are the nemesis of bidirectional search 😄 you'll notice that it'd be perfect if you could paste a link to https://valhalla.openstreetmap.de/ as well for the waypoints. |
ah, what's likely happening here: also bidir a* probably can't find the connection on the forward tree (which is exhausting) but on the reverse tree. I bet the same is true for matrix: try |
After the last update of Valhalla, we started seeing weird behavior and mismatches between /route and /sources_to_targets APIs for the "auto" costing model. For some reason, the "auto" costing option for the matrix returns nulls. When you build a direct route for "auto," it works fine. It also works for the "truck" costing option for route and for matrix.
Matrix for costing "auto" (does NOT work)
https://valhalla1.openstreetmap.de/sources_to_targets?json={"sources":[{"lat":33.61980715,"lon":-117.6996384}],"targets":[{"lat":33.62013665,"lon":-117.6990124}],"costing":"auto"}
Route for costing "auto" - (works)
https://valhalla1.openstreetmap.de/route?json={"locations":[{"lat":33.61980715,"lon":-117.6996384},{"lat":33.62013665,"lon":-117.6990124}],"costing":"auto","directions_type":"none"}
Matrix - changed to "truck" - (works)
https://valhalla1.openstreetmap.de/sources_to_targets?json={"sources":[{"lat":33.61980715,"lon":-117.6996384}],"targets":[{"lat":33.62013665,"lon":-117.6990124}],"costing":"truck"}
I found similar issues, and we also tried to change
kDefaultMaxupTransitions
as mentioned in the other issue, but without much success. Any help is appreciated!The text was updated successfully, but these errors were encountered: