optimal route planning on mobile systems
play

Optimal Route Planning on Mobile Systems Adrian Batzill Structure - PowerPoint PPT Presentation

M A S T E R T H E S I S Optimal Route Planning on Mobile Systems Adrian Batzill Structure Route Planning Unidirectional, Bidirectional, Hierarchical External Memory Results Optimal Route Planning on Mobile Systems 2/22


  1. M A S T E R T H E S I S Optimal Route Planning on Mobile Systems Adrian Batzill

  2. Structure ● Route Planning – Unidirectional, Bidirectional, Hierarchical ● External Memory ● Results Optimal Route Planning on Mobile Systems 2/22 Adrian Batzill

  3. Route Planning ● Road network as weighted, directed graph ● Shortest path algorithms to find best route ● Best? – Shortest (distance) – Fastest (traveltime) – Most beautiful – Curvy – Fuel saving – …. – A mix of multiple criteria Optimal Route Planning on Mobile Systems 3/22 Adrian Batzill

  4. Dijkstra‘s Algorithm ● Similar to breadth-first search ● Incrementally construct all shortest paths from source ● Stop when target is visited ● Priority queue with tentative distance Optimal Route Planning on Mobile Systems 4/22 Adrian Batzill

  5. 7 4 1 s 3 t 1 1 1 Optimal Route Planning on Mobile Systems 5/22 Adrian Batzill

  6. 6/22

  7. A* Algorithm ● Very similar to Dijkstra ● Goal-directed with heuristic ● Optimal for monotonic (underestimating) heuristics ● Simple: Use straight line – At least for a distance -weighting dist – For traveltime -weighting: max − speed Optimal Route Planning on Mobile Systems 7/22 Adrian Batzill

  8. ALT (A*, Landmarks, Triangle inequality) ● Heuristic for A* ● Two-phase algorithm ● Preprocessing on dev machine – Pick set of landmarks – Precompute distances to/from all nodes to all landmarks ● Use as heuristic during runtime c ( l,t )≤ c ( s,t )+ c ( l, s ) c ( s,l )≤ c ( s,t )+ c ( t ,l ) c ( l,t )− c ( l,s )≤ c ( s ,t ) → c ( s,l )− c ( t ,l )≤ c ( s ,t ) Optimal Route Planning on Mobile Systems 8/22 Adrian Batzill

  9. Query Times BW: ● Dijkstra: 171 ms ● A*-straight: 110 ms ● A*-lm20: 17 ms 9/22

  10. Bidirectional search ● Invert graph, search from target to source → search from both directions ● Stop when searches meet ● For Dijkstra: two circles with radius c ( s,t ) 2 ● A*: not as simple Optimal Route Planning on Mobile Systems 10/22 Adrian Batzill

  11. Query Times BW: ● Dijkstra: 171 ms ● A*-straight: 110 ms ● A*-lm20: 17 ms Bidirectional: ● Dijkstra: 121 ms ● A*-straight: 89 ms ● A*-lm20: 10 ms 11/22

  12. Contraction Hierarchies ● Node Contraction: 1 1 1 v 2 3 Optimal Route Planning on Mobile Systems 12/22 Adrian Batzill

  13. Contraction Hierarchies ● Precomputation: – Assume nodes ordered by importance – Contract nodes in this order: →Mark node contracted →Add required shortcuts ● Bidirectional Dijkstra – Only search upwards by importance – Unpack shortcuts to retrieve path Optimal Route Planning on Mobile Systems 13/22 Adrian Batzill

  14. Query Times BW: ● CH: 0.5 ms 14/22

  15. External Memory ● Secondary storage for working data – Persistent – Cheap – Slow Optimal Route Planning on Mobile Systems 15/22 Adrian Batzill

  16. Memory mapped files Optimal Route Planning on Mobile Systems 16/22 Adrian Batzill

  17. Chunked/Managed mmap ● Problem: 32 bit systems – Not enough address space (Windows: max 2Gb) → Chunked mmap ● Problem: management – Managed memory mapped files – Custom C++ Allocator with placement-new – Custom pointer-type – Custom containers → auto graph = InMemoryAllocator<Graph>().allocate() → auto graph = MmapAllocator<Graph>().allocate() Optimal Route Planning on Mobile Systems 17/22 Adrian Batzill

  18. Graph Optimization ● Sort nodes by – Breadth-first search – Locality (Z-order/Geohash, Hilbert curve) – CH-level (importance) ● Sort edges by – Breadth-first search – Source node Optimal Route Planning on Mobile Systems 18/22 Adrian Batzill

  19. Performance Baseline performance Optimal Route Planning on Mobile Systems 19/22 Adrian Batzill

  20. Performance Best: Geohash/Sourcenode Optimal Route Planning on Mobile Systems 20/22 Adrian Batzill

  21. Performance ● CH slower than landmarks – Node order suboptimal – Sorting by CH-level: → 589 ms on lowend-hdd (vs. 4568 ms) Optimal Route Planning on Mobile Systems 21/22 Adrian Batzill

  22. Demo Optimal Route Planning on Mobile Systems 22/22 Adrian Batzill

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend