Robert Geisberger, Moritz Kobitzsch and Peter Sanders:
Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II Institute for Theoretical Computer Science, Algorithmics II Flexible Route Planning with Contraction Hierarchies Robert Geisberger, Moritz Kobitzsch and Peter Sanders {geisberger,kobitzsch,sanders}@kit.edu KIT University of the State of Baden-Wrttemberg and National Large-scale Research Center of the Helmholtz Association www.kit.edu Motivation 2 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II route planning becomes ubiquitous route planning services e. g. Google Maps wide spread generates wide variety of interests multiple optimization criterias possible (e.g. (time|cost) ) a b c d e f (3|6) (1|2) (1|1) (1|2) (1|2) (2|1) (3|0) (3|1) Motivation 2 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II route planning becomes ubiquitous route planning services e. g. Google Maps wide spread generates wide variety of interests multiple optimization criterias possible (e.g. (time|cost) ) a b c d e f (3|6) (1|2) (1|1) (1|2) (1|2) (2|1) (3|0) (3|1) a f (3|6) Motivation 2 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II route planning becomes ubiquitous route planning services e. g. Google Maps wide spread generates wide variety of interests multiple optimization criterias possible (e.g. (time|cost) ) a b c d e f (3|6) (1|2) (1|1) (1|2) (1|2) (2|1) (3|0) (3|1) a f (3|6) a f (4|4) Motivation 2 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II route planning becomes ubiquitous route planning services e. g. Google Maps wide spread generates wide variety of interests multiple optimization criterias possible (e.g. (time|cost) ) a b c d e f (3|6) (1|2) (1|1) (1|2) (1|2) (2|1) (3|0) (3|1) a f (3|6) a f (4|4) a f (7|2) Just imagine... 3 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II Pareto Optimality 4 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II nd all non dominated routes A dominates B if A is better or equal to B in every weight term may result in an exponential number of routes heuristics necessary to gain practical algorithms a b c d e f (1|2) (1|1) (1|2) (1|2) (3|0) (3|1) a f (3|6) (7|2) (2|1) (4|4) Pareto Optimality 4 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II nd all non dominated routes A dominates B if A is better or equal to B in every weight term may result in an exponential number of routes heuristics necessary to gain practical algorithms a b c d e f (1|2) (1|1) (1|2) (1|2) (3|0) (3|1) a f (3|6) (7|2) (2|3) (4|6) Parameterized Optimality 5 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II linear combination of weight terms (t |c) t + p c preprocessing considers all possible parameter values query for xed parameter single criteria techniques parameter range allows to select maximal impact of weight terms p = 0 a b c d e f (1|2) (1|1) (1|2) (1|2) (2|1) (3|0) (3|1) Parameterized Optimality 5 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II linear combination of weight terms (t |c) t + p c preprocessing considers all possible parameter values query for xed parameter single criteria techniques parameter range allows to select maximal impact of weight terms p = 0 0 1 1 2 4 3 p = 0 (3|6) (1|2) 1 (1|1) 1 (1|2) 1 (1|2) 1 (2|1) 2 (3|0) 3 (3|1) 3 Parameterized Optimality 5 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II linear combination of weight terms (t |c) t + p c preprocessing considers all possible parameter values query for xed parameter single criteria techniques parameter range allows to select maximal impact of weight terms p = 0 0 3 2 5 5 8 p = 1 (4|4) (1|2) 3 (1|1) 2 (1|2) 3 (1|2) 3 (2|1) 3 (3|0) 3 (3|1) 4 Parameterized Optimality 5 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II linear combination of weight terms (t |c) t + p c preprocessing considers all possible parameter values query for xed parameter single criteria techniques parameter range allows to select maximal impact of weight terms p = 0 0 5 3 7 6 11 p = 2 (7|2) (1|2) 5 (1|1) 3 (1|2) 5 (1|2) 5 (2|1) 4 (3|0) 3 (3|1) 5 Parameterized Weight Functions 6 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II the distance function d(a, f ) for two nodes a, f is concave monotone due to positive weight terms a b c d e f (1|2) (1|1) (1|2) (1|2) (2|1) (3|0) (3|1) (3|6) (4|4) a f (7|2) p d(a, f , p) Contraction Hierarchy Routing 7 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II order nodes by importance {v 1 , . . . , v n } contract in this order preserve original distances by adding shortcuts necessity of shortcuts decided by witness paths query only relaxes edges to more important nodes a b c d a b c d 1 2 1 1 2 1 3 n o d e o r d e r Contraction Hierarchy Routing 7 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II order nodes by importance {v 1 , . . . , v n } contract in this order preserve original distances by adding shortcuts necessity of shortcuts decided by witness paths query only relaxes edges to more important nodes a b c d a b c d 1 2 1 1 2 1 3 n o d e o r d e r a d a d b c c Flexible Contraction Hierarchies 8 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II shortcuts in exible scenario if p : (a, b, c) is the only shortest path necessity of shortcuts only on continuous intervals store necessity interval in edges necessity interval on average deductable from two single criteria Dijkstra queries query uses only necessary edges a c d (3|1) (3|1) b (2|4) (2|4) p d(a, c, p) 1/3 . Flexible Contraction Hierarchies 8 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II shortcuts in exible scenario if p : (a, b, c) is the only shortest path necessity of shortcuts only on continuous intervals store necessity interval in edges necessity interval on average deductable from two single criteria Dijkstra queries query uses only necessary edges a c d (3|1) (3|1) (4|8) b [0,1/3] p d(a, c, p) 1/3 . Flexible Contraction Hierarchies 9 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II single node order not practical for wide parameter range a lot of shortcuts for all parameter values split parameter interval with heuristics repeat as necessary buckets to support fast scanning of necessary edges level Core-ALT for ex-CH 10 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II core based approach to speed up preprocessing (uncontracted core) speed up query (contracted core) uses ALT algorithm on |k| topmost nodes adaptable to exible scenario with linear interpolation p d(a, f , p) Prole Queries 11 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II nd all possible paths prole query with maximal 3 #paths 2 queries approximation: recursion only if improvement larger more than (1 + ) possible p d(a, f , p) Prole Queries 11 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II nd all possible paths prole query with maximal 3 #paths 2 queries approximation: recursion only if improvement larger more than (1 + ) possible p d(a, f , p) Prole Queries 11 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II nd all possible paths prole query with maximal 3 #paths 2 queries approximation: recursion only if improvement larger more than (1 + ) possible p d(a, f , p) Prole Queries 11 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II nd all possible paths prole query with maximal 3 #paths 2 queries approximation: recursion only if improvement larger more than (1 + ) possible p d(a, f , p) Experimental results 12 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II Table: Preprocessing and query performance for 64 landmarks on the German road network, average over 10000 queries. (4 692 751 nodes and 10806 191 directed edges) core preproc space query speedup [hh:mm] [B/node] [ms] - - 60 2 037.52 1 0 1 : 54 159 2.90 698 uncontracted 5 000 1 : 08 167 2.58 789 contracted 10 000 2 : 07 183 0.63 3234 Experimental results 13 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II 0 0.125 0.25 0.5 1 2 4 8 16 32 0 1 0 2 0 3 0 4 0 5 0 6 0 epsilon (%) # found paths query time [ms] Comparison to SHARC 14 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II Table: Approximated prole search on Western Europe preproc # time algorithm paths [ms] exCH 5 : 15 0.00 12.5 21.9 exCH 5 : 15 0.01 5.7 6.2 Pareto-SHARC 7 : 12 (no guarantee) 5.3 35.4 Conclusion 15 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II exact exible routing for server scenarios comparable even to single criteria speedups circumvents problems of Pareto-optimality scales well through parameter splitting Thank You 16 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II Thank you for your attention. Questions 17 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II Questions? Future Work 18 Robert Geisberger, Moritz Kobitzsch and Peter Sanders: Flexible Route Planning with Contraction Hierarchies Faculty for Computer Science Institute for Theoretical Computer Science, Algorithmics II mobile implementation apply parallelization techniques more than two weight terms (?)