Contraction Hierarchies: Faster and Simpler Hierarchical Routing in - - PowerPoint PPT Presentation

contraction hierarchies faster and simpler hierarchical
SMART_READER_LITE
LIVE PREVIEW

Contraction Hierarchies: Faster and Simpler Hierarchical Routing in - - PowerPoint PPT Presentation

Motivation Our Contributions Contraction Hierarchies: Faster and Simpler Hierarchical Routing in Road Networks R. Geisberger P . Sanders D. Schultes D. Delling 7th International Workshop on Experimental Algorithms R. Geisberger, P .


slide-1
SLIDE 1

Motivation Our Contributions

Contraction Hierarchies: Faster and Simpler Hierarchical Routing in Road Networks

  • R. Geisberger

P . Sanders

  • D. Schultes
  • D. Delling

7th International Workshop on Experimental Algorithms

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 1

slide-2
SLIDE 2

Motivation Our Contributions Route Planning Previous Work

Motivation

exact shortest paths calculation in large road networks minimize:

query time preprocessing time space consumption

+ simplicity

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 2

slide-3
SLIDE 3

Motivation Our Contributions Route Planning Previous Work

Mobile Navigation

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 3

slide-4
SLIDE 4

Motivation Our Contributions Route Planning Previous Work

Logistics

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 4

slide-5
SLIDE 5

Motivation Our Contributions Route Planning Previous Work

Highway-Node Routing (HNR)

[Sanders and Schultes, WEA 07] general approach + adopt correctness proofs

  • relies on another method to create hierarchies
  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 5

slide-6
SLIDE 6

Motivation Our Contributions Route Planning Previous Work

Highway Hierarchies (HH)

[Sanders and Schultes, ESA 05, 06] two construction steps that are iteratively applied

removal of low degree nodes removal of edges that only appear on shortest paths close to source or target

Contraction Hierarchies (CH) are a radical simplification

s t

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 6

slide-7
SLIDE 7

Motivation Our Contributions Route Planning Previous Work

Speedup Techniques

Transit-Node Routing (TNR) [BFSS07] fastest speedup technique known today higher preprocessing time

s t

Goal-Directed Routing can be combined with hierarchical speedup techniques [DDSSSW08] ⇒ both techniques benefit from Contraction Hierarchies (CH)

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 7

slide-8
SLIDE 8

Motivation Our Contributions Contraction Hierarchies Experiments

Contraction Hierarchies (CH)

2 1 2 2 6 1 4 3 5 3 3 5 8 2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 8

slide-9
SLIDE 9

Motivation Our Contributions Contraction Hierarchies Experiments

Main Idea

Contraction Hierarchies (CH) contract only one node at a time ⇒ local and cache-efficient operation in more detail:

  • rder nodes by “importance”, V = {1, 2, . . . , n}

contract nodes in this order, node v is contracted by foreach pair (u, v) and (v, w) of edges do if u, v, w is a unique shortest path then add shortcut (u, w) with weight w(u, v, w) query relaxes only edges to more “important” nodes ⇒ valid due to shortcuts

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 9

slide-10
SLIDE 10

Motivation Our Contributions Contraction Hierarchies Experiments

Example: Construction

2 3 2 1 2 2 6 1 3 5 4

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 10

slide-11
SLIDE 11

Motivation Our Contributions Contraction Hierarchies Experiments

Example: Construction

2 3 2 1 2 2 6 1 4 3 5 5

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 10

slide-12
SLIDE 12

Motivation Our Contributions Contraction Hierarchies Experiments

Example: Construction

2 1 2 2 6 1 4 3 5 5 3 2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 10

slide-13
SLIDE 13

Motivation Our Contributions Contraction Hierarchies Experiments

Example: Construction

2 1 2 2 6 1 4 3 5 5 3 2 3

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 10

slide-14
SLIDE 14

Motivation Our Contributions Contraction Hierarchies Experiments

Example: Construction

2 2 2 6 1 4 3 5 3 2 3 8 1 5

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 10

slide-15
SLIDE 15

Motivation Our Contributions Contraction Hierarchies Experiments

Example: Construction

2 1 2 2 6 1 4 3 5 3 3 5 8 2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 10

slide-16
SLIDE 16

Motivation Our Contributions Contraction Hierarchies Experiments

Construction

to identify necessary shortcuts local searches from all nodes u with incoming edge (u, v) ignore node v at search add shortcut (u, w) iff found distance d(u, w) > w(u, v) + w(v, w)

1 1 1 1 1 v

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 11

slide-17
SLIDE 17

Motivation Our Contributions Contraction Hierarchies Experiments

Construction

to identify necessary shortcuts local searches from all nodes u with incoming edge (u, v) ignore node v at search add shortcut (u, w) iff found distance d(u, w) > w(u, v) + w(v, w)

2 2 1 1 1 1 1 v

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 11

slide-18
SLIDE 18

Motivation Our Contributions Contraction Hierarchies Experiments

Node Order

use priority queue of nodes, node v is weighted with a linear combination of: edge difference #shortcuts – #edges incident to v uniformity e.g. #deleted neighbors . . .

2 2 1 1 1 1 1 v

2 − 3 = −1 integrated construction and ordering:

1

remove node v on top of the priority queue

2

contract node v

3

update weights of remaining nodes

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 12

slide-19
SLIDE 19

Motivation Our Contributions Contraction Hierarchies Experiments

Query

modified bidirectional Dijkstra algorithm upward graph G↑:= (V, E↑) with E↑:= {(u, v) ∈ E : u < v} downward graph G↓:= (V, E↓) with E↓:= {(u, v) ∈ E : u > v} forward search in G↑ and backward search in G↓

2 1 2 2 6 1 4 3 5 3 3 5 8

s t

node order

2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 13

slide-20
SLIDE 20

Motivation Our Contributions Contraction Hierarchies Experiments

Query

modified bidirectional Dijkstra algorithm upward graph G↑:= (V, E↑) with E↑:= {(u, v) ∈ E : u < v} downward graph G↓:= (V, E↓) with E↓:= {(u, v) ∈ E : u > v} forward search in G↑ and backward search in G↓

2 1 2 2 6 1 4 3 5 3 3 5 8

s t

node order

2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 13

slide-21
SLIDE 21

Motivation Our Contributions Contraction Hierarchies Experiments

Query

modified bidirectional Dijkstra algorithm upward graph G↑:= (V, E↑) with E↑:= {(u, v) ∈ E : u < v} downward graph G↓:= (V, E↓) with E↓:= {(u, v) ∈ E : u > v} forward search in G↑ and backward search in G↓

2 1 2 2 6 1 4 3 5 3 3 5 8

s t

node order

2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 13

slide-22
SLIDE 22

Motivation Our Contributions Contraction Hierarchies Experiments

Query

modified bidirectional Dijkstra algorithm upward graph G↑:= (V, E↑) with E↑:= {(u, v) ∈ E : u < v} downward graph G↓:= (V, E↓) with E↓:= {(u, v) ∈ E : u > v} forward search in G↑ and backward search in G↓

2 1 2 2 6 1 4 3 5 3 3 5 8

s t

node order

2

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 13

slide-23
SLIDE 23

Motivation Our Contributions Contraction Hierarchies Experiments

Outputting Paths

for a shortcut (u, w) of a path u, v, w, store middle node v with the edge expand path by recursively replacing a shortcut with its originating edges 2 3 2 5 1 2 3 8

node order

2 5

s t

6 1 4 3

s t

unpack path 2 8 2 2 2 5 3 3 3 2 2 1 2 3 2 6 1 3 5 4 2 6 1 5 4 2 6 5 4 2 6 5

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 14

slide-24
SLIDE 24

Motivation Our Contributions Contraction Hierarchies Experiments

Stall-on-Demand

v can be “stalled” by u (if d(u) + w(u, v) < d(v)) stalling can propagate to adjacent nodes search is not continued from stalled nodes

3 6 1

s

node order

v 2 u w

7

does not invalidate correctness (only suboptimal paths are stalled)

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 15

slide-25
SLIDE 25

Motivation Our Contributions Contraction Hierarchies Experiments

Experiments

environment AMD Opteron Processor 270 at 2.0 GHz 8 GB main memory GNU C++ compiler 4.2.1 test instance road network of Western Europe (PTV) 18 029 721 nodes 42 199 587 directed edges

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 16

slide-26
SLIDE 26

Motivation Our Contributions Contraction Hierarchies Experiments

Performance

  • E

ED EDL EDSL EDS5 EDS1235 EVSQL EVSWQL economical aggressive 500 1000 2000 4000 8000 16000 100 150 200 300 400 600 node ordering [s] query [µs] method E D L S i V Q W edge difference deleted neighbors limit search space on weight calculation search space size (digits) hop limits for testing shortcuts Voronoi region size upper bound on edges in search path relative betweenness

HNR: 594 s / 802 µs

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 17

slide-27
SLIDE 27

Motivation Our Contributions Contraction Hierarchies Experiments

Worst Case Costs

1 100 10−12 10−10 10−8 10−6 10−4 10−2 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 settled nodes % of searches CH aggr. (max. 884) CH eco. (max. 1012) HNR (max. 2148)

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 18

slide-28
SLIDE 28

Motivation Our Contributions Contraction Hierarchies Experiments

Additional Results

space overhead HNR 9.5 B/node CH economical 0.6 B/node CH aggressive

  • 2.7 B/node

Many-to-Many Shortest Paths [KSSSW07] 10 000 × 10 000 table 23.2 → 10.2 s Transit Node Routing [BFSS07] query time 4.3 → 3.4 µs

s t

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 19

slide-29
SLIDE 29

Motivation Our Contributions Contraction Hierarchies Experiments

Graph Representation

search graph usually store edge (v, w) in the adjacency array of v and w for the search, we need to store it only at node min {v, w} possibly negative space overhead

v w u

shortcut

stored at u stored at w

node order

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 20

slide-30
SLIDE 30

Motivation Our Contributions

Summary

Contraction Hierarchies are simple less space overhead 5× faster queries than the best previous hierarchical Dijkstra-based speedup techniques new foundation for other routing algorithms like Transit-Node Routing Future work

test other priority terms time-dependent routing dynamization

f(x) =

  • R. Geisberger, P

. Sanders, D. Schultes, D. Delling Contraction Hierarchies 21