2ima20 algorithms for geographic data
play

2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 11: - PowerPoint PPT Presentation

2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 11: Route Planning Vehicle navigation systems Main tasks: positioning : locating the vehicle using GPS and/or dead reckoning with distance and heading sensors routing :


  1. 2IMA20 Algorithms for Geographic Data Spring 2016 Lecture 11: Route Planning

  2. Vehicle navigation systems  Main tasks:  positioning : locating the vehicle using GPS and/or dead reckoning with distance and heading sensors  routing : determining a good route from a source to a destination  guidance : providing visual and audio feedback on the route

  3. Positioning  GPS: works well, except in “urban canyons”  Urban canyons can give gross errors in position due to reflections from buildings  Urban canyons can give loss of signal  Especially problematic when driving out of parking garages

  4. Positioning  Dead reckoning: determine position from last known position using distance and heading sensors (relative position)  Use map matching: the shape of the route taken and where it matches on the map, to correct dead reckoning

  5. Guiding  Top view, perspective view, overview  Schematic information on exit lanes  Spoken directions  largely an Human-Computer-Interaction issue  Algorithms for automated map construction

  6. Routing  Routing = “shortest” path computation  Dijkstra’s algorithm solves the problem, so we can all go home now (after O(m + n log n) time for routing)?  Can we do better?

  7. Routing – Basic examples  Based on Dijkstra’s shortest path algorithm  Many improvements to deal with huge networks  Improvements use preprocessing

  8. Routing – Basic examples  Based on Dijkstra’s shortest path algorithm  Many improvements to deal with huge networks  Improvements use preprocessing

  9. Routing – Basic examples  Based on Dijkstra’s shortest path algorithm  Many improvements to deal with huge networks  Improvements use preprocessing Bidirectional search (from Bayreuth and from Erlangen)

  10. Routing – Basic examples  Based on Dijkstra’s shortest path algorithm  Many improvements to deal with huge networks  Improvements use preprocessing Bidirectional search (from Bayreuth and from Erlangen)

  11. Routing – Overview of techniques  Goal-directed  A*, ALT: A* with landmarks and triangle inequality  Arc Flags  Separator-based  Hierarchical  Highway hierarchies  Contraction hierarchies  Bounded hop  Transit node routing  For public transit networks: time-expanded vs time-dependent

  12. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 2 10 6 9 4 2 3 9 7 6 5 2

  13. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges ∞ 1 ∞ 2 10 6 ∞ 9 4 2 3 0 9 7 6 5 ∞ ∞ 2

  14. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges ∞ 1 ∞ 2 10 6 ∞ 9 4 2 3 0 9 7 6 5 ∞ ∞ 2

  15. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges ∞ 1 10 2 10 6 ∞ 9 4 2 3 0 9 7 6 5 ∞ 5 2

  16. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges ∞ 1 10 2 10 6 ∞ 9 4 2 3 0 9 7 6 5 ∞ 5 2

  17. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges ∞ 1 10 2 10 6 ∞ 9 4 2 3 0 9 7 6 5 ∞ 5 2

  18. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 14 8 2 10 6 9 4 14 2 3 0 9 7 6 5 7 5 2

  19. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 14 8 2 10 6 9 4 14 2 3 0 9 7 6 5 7 5 2

  20. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 14 8 2 10 6 9 4 14 2 3 0 9 7 6 5 7 5 2

  21. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 13 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  22. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 13 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  23. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 13 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  24. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  25. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  26. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  27. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  28. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  29. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  30. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  31. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges shortest path tree 1 9 8 2 10 6 9 4 13 2 3 0 9 7 6 5 7 5 2

  32. Recap: Dijkstra’s algorithm  Dijkstra’s algorithm takes O( m + n log n ) time for a graph with n nodes and m edges  Every node is handled only once  Its outgoing edges are considered only then  Considering an edge may lower the cost of its destination node  In theory: nodes are stored by distance in a Fibonacci heap (it allows for a very efficient decrease-value operation)  In practice: use binary heap or generalization e.g. 4-heap: O((m+n) log n) time  Road networks have m = O( n ), so it takes O( n log n ) time

  33. A* algorithm A* is a simple variant of Dijkstra's algorithm  Additionally: for each node u, a value h[u] that estimates dist(u, t), where t is the target  h is often called the heuristic function of A*  Difference to Dijkstra: value of a node u in the priority queue is not dist[u] but dist[u] + h[u]  therefore, if h[u] = 0 for all u, then A* = Dijkstra  Works if h is admissable and monotone ... later slide  Best results when h[u] = dist(u, t) for all u  then A* settles only the nodes on a shortest path

  34. A* Example 2 2 2 10 1 10 1 1

  35. A* Example h=1 h=3 2 2 h=0 2 h=5 h=7 10 1 10 h=6 1 1 h=7

  36. A* Example h=1 h=3 2 2 h=0 2 h=5 h=7 10 0 +5 1 10 h=6 1 1 h=7

  37. A* Example h=1 h=3 2 2 +3 2 h=0 2 h=5 h=7 10 0 1 10 h=6 1 1 +6 1 h=7

  38. A* Example h=1 h=3 2 2 2 h=0 2 h=5 h=7 10 0 1 10 h=6 1 1 +6 1 h=7

  39. A* Example h=1 h=3 2 4 +1 2 2 h=0 2 h=5 h=7 10 0 1 10 h=6 1 1 +6 1 h=7

  40. A* Example h=1 h=3 2 4 2 2 h=0 2 h=5 h=7 10 0 1 10 h=6 1 1 +6 1 h=7

  41. A* Example h=1 h=3 2 4 2 2 h=0 2 h=5 h=10 6 +0 10 0 1 10 h=9 1 1 +6 1 h=10

  42. A* Example h=1 h=3 2 4 2 2 h=0 2 h=5 h=7 6 10 0 1 10 h=6 1 1 +6 1 h=7

  43. A* algorithm — Conditions on h  The heuristic h must be admissable  For each node u it must hold: h(u) ≤ dist(u, t)  Informally: the heuristic must never overestimate  The heuristic h must be monotone  For each arc (u,v) it must hold: h(u) ≤ cost(u,v) + h(v)  Informally: heuristic must obey the triangle inequality  How do we compute h?

  44. A* algorithm — Two heuristics  Straight-line distance (also: as-the-crow-flies distance)  Take h(u) = eucl(u, t) / v max  eucl(u,t) is the Euclidean distance from u to t  v max is the maximum speed  Admissible and monotone because of triangle inequality  Landmark heuristic  Informally: for every node u, precompute distances to a set of pre-selected nodes, called landmarks  How to obtain a heuristic function from that ... next slides

Recommend


More recommend