Skip to content
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

Why does increasing loki radius end up giving sub-optimal routes? #2587

Open
abvhinash opened this issue Sep 10, 2020 · 8 comments
Open

Why does increasing loki radius end up giving sub-optimal routes? #2587

abvhinash opened this issue Sep 10, 2020 · 8 comments

Comments

@abvhinash
Copy link

abvhinash commented Sep 10, 2020

I am trying to figure out how Loki radius value impacts route. As per the documentation, loki radius is used for coming up with a set of candidates. If there are no candidates within this distance it will return the closest candidate within reason. I can see that if I increase the radius I see additional PathLocations (I am assuming it means more candidates). However, as the radius increases, for some reason thor starts giving really sub-optimal and much longer routes. I even played with disabling "rank_candidates" flag but that did not help. Can anyone shed some light on why radius=0 gives good routes but as I start increasing the radius values, I am getting much worse routes? Any help on this will be greatly appreciated!

PS: I am using pedestrian costing and input locations (start/end) are pretty close by. Not sure if that is playing a part.

@abvhinash
Copy link
Author

@kevinkreiser Any insights into this?

@kevinkreiser
Copy link
Member

kevinkreiser commented Sep 14, 2020

@abvhinash i think the best way for us to reason about this would be for you to give us an example. If you could show the result on a map with the radius set to 0 and a good result, and set the radius larger and show the bad result, it will make it much easier for us to think about what could be going wrong in your particular case. as you probably have realized this can be quite complex to choose a heuristic that works right for the bulk of cases so itd be good for us to see a case where it works poorly so we can think about why its happening. thanks!

@abvhinash
Copy link
Author

Hi @kevinkreiser , Sincere apologies for my late response. I was tied up with a few other things and finally got a chance to create an example. Here it is:
Start coordinate: -122.3351606, 47.6137100
Destination coordinate: -122.3350341, 47.6135995

With radius 10, here is the route: http://valhalla.github.io/demos/polyline/?unescape=false&polyline6=false#upraHvqtiVAE_%40kAMc%40Ys%40%40ELODIBABJbAdD

With radius 0, here is the route: http://valhalla.github.io/demos/polyline/?unescape=false&polyline6=false#spraHtqtiVJMFE

@kevinkreiser
Copy link
Member

@abvhinash i dont have time to triage this right now but this certainly does look like a bug at first glance. ill set the label and come back to it when i have time. unless someone else beats me to it

@abhi2039
Copy link
Contributor

@kevinkreiser This is the issue we chatted about during our call yesterday. Normally it is not an issue but if there is a reroute towards the end then someone could hit this.

@kevinkreiser
Copy link
Member

this makes me think of something strange with trivial routes. I'll have a look at it later today!

@liyinxiao
Copy link
Contributor

This issue should be fixed with #3582

@nilsnolde
Copy link
Member

I think @liyinxiao is right, it was likely fixed with #3585. If you're still on this, could you try @abvhinash and close the issue if it's solved? Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants