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

Fix pedestrian routes using walkway_factor #1780

Merged
merged 8 commits into from
May 1, 2019
Merged

Conversation

dgearhart
Copy link
Member

@dgearhart dgearhart commented Apr 30, 2019

Issue

We were seeing crazy routes when testing the walkway_factor values. After analyzing routes we did the following:

  • Updated the walkway and sidewalk factor defaults
  • Updated the AStarCostFactor method so we do not create crazy routes when favoring walkways
  • Added more pedestrian test routes

BEFORE#1 walkway_factor = 0.1
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L4
bad_ped4_wf0 1

AFTER#1 walkway_factor = 0.1
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L4
good_ped4_wf0 1

BEFORE#2 walkway_factor = 0.8
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L17
bad_ped17_wf0 8

AFTER#2 walkway_factor = 0.8
https://github.com/valhalla/valhalla/blob/gdg_walkway_factor/test_requests/pedestrian_routes.txt#L17
good_ped17_wf0 8

Tasklist

  • Test
  • Review - you must request approval to merge any PR to master
  • Generally use squash merge to rebase and clean comments before merging
  • Update the changelog

Updated the AStarCostFactor method so we do not create crazy routes when favoring walkways
…with walkway_factor options

Added more test routes
factor *= driveway_factor_;
}

return (speedfactor_ * factor);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noting that A*s goal estimation heuristic should never overestimate the actual cost to the goal, we landed on this implementation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://en.wikipedia.org/wiki/Consistent_heuristic <-- that is what i was referring to

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to limit how small the factors can be. Making them very small values like 0.1 will force the A* factor to change and performance will drop. Also, it is usually more effective to penalize edges rather than favor them, so to dramatically favor walkways one might try penalizing regular roads (weighting factor > 1.0)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The favor examples were used to show that it was not working as expected prior to the change. The thinking is that it will be used more for avoiding every separate sidewalk to keep a simpler path and calling out street names for users

@dgearhart dgearhart merged commit bd08b4f into master May 1, 2019
@kevinkreiser kevinkreiser deleted the gdg_walkway_factor branch June 6, 2019 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants