View
218
Download
0
Category
Preview:
Citation preview
8/12/2019 Transport Optimization Finland 2009
1/35
Algorithm Engineering for Large Graphs
Fast Route Planning
Veit Batz,Robert Geisberger, Dennis Luxen,
Peter Sanders, Christian Vetter
Universitt Karlsruhe (TH)
8/12/2019 Transport Optimization Finland 2009
2/35
Sanders et al.: Route Planning 2
Route Planning
?
Goals: exactshortest paths inlarge (time-dependent) road networks
fast queries(point-to-point, many-to-many)
fast preprocessing
low spaceconsumption
fast updateoperations
Applications:
route planning systems in the internet, car navigation systems,
ride sharing, traffic simulation, logistics optimisation
8/12/2019 Transport Optimization Finland 2009
3/35
1
1
1
1
1
v
Sanders et al.: Route Planning 3
Contraction Hierarchies
[WEA 08]
ordernodes by importance, V={1,2, . . . ,n}
contractnodes in this order, nodev is contracted by
foreachpair(u,v)and(v,w)of edgesdo
ifu,v,wis a unique shortest paththenaddshortcut(u,w)with weightw(u,v,w)
queryrelaxes only edges
to more important nodes
valid due to shortcuts
21 2
2
6
1
4
3
5
3
35
8
s
tnode
order
2
8/12/2019 Transport Optimization Finland 2009
4/35
2
2
1
1
1
1
1
v
Sanders et al.: Route Planning 4
Contraction Hierarchies
[WEA 08]
ordernodes by importance, V={1,2, . . . ,n}
contractnodes in this order, nodev is contracted by
foreachpair(u,v)and(v,w)of edgesdo
ifu,v,wis a unique shortest paththenaddshortcut(u,w)with weightw(u,v,w)
queryrelaxes only edges
to more important nodes
valid due to shortcuts
21 2
2
6
1
4
3
5
3
35
8
s
tnode
order
2
8/12/2019 Transport Optimization Finland 2009
5/35
2
2
1
1
1
1
1
v
Sanders et al.: Route Planning 5
Node Order
usepriority queueof nodes, nodev is weighted with a linear
combination of:
edge difference:#shortcuts#edgesincident tov
uniformity:e.g. #deleted neighbors
. . .
integrated construction and ordering:
1. popnodev on top of the priority queue
2. contractnodev
3. update weightsof remaining nodes
8/12/2019 Transport Optimization Finland 2009
6/35
Saarbrcken to Karlsruhe299 edges compressed to 13 shortcuts.
8/12/2019 Transport Optimization Finland 2009
7/35
Saarbrcken to Karlsruhe
316 settled nodes and 951 relaxed edges
8/12/2019 Transport Optimization Finland 2009
8/35
Sanders et al.: Route Planning 8
Contraction Hierarchies
foundationfor our other methods
conceptuallyvery simple
handlesdynamic scenarios
Static scenario:
7.5 minpreprocessing
0.21 msto determine the path length
0.56 msto determine a complete path description
little space consumption (23 bytes/node)
8/12/2019 Transport Optimization Finland 2009
9/35
Sanders et al.: Route Planning 9
Transit-Node Routing
[DIMACS Challenge 06, ALENEX 07, Science 07]
joint work with H. Bast, S. Funke, D. Matijevic
very fast queries
(down to1.7s, 3 000 000 times faster than D IJKSTRA)
winnerof the 9th DIMACS Implementation Challenge
more preprocessing time (2:37h) and space (263 bytes/node) needed
s t
SciAm50 Award
8/12/2019 Transport Optimization Finland 2009
10/35
Sanders et al.: Route Planning 10
Many-to-Many Shortest Paths
joint work with S. Knopp, F. Schulz, D. Wagner
[ALENEX 07]
efficientmany-to-many variantof
hierarchical bidirectional algorithms
10 00010 000 table in10s
S
8/12/2019 Transport Optimization Finland 2009
11/35
Sanders et al.: Route Planning 11
Many-to-Many Shortest Paths
input:sourcesS={s1, . . . ,sn}andtargetsT={t1, . . . ,tm}
naive algorithm a: performmin(n,m)Dijkstra one-to-many
searches
n=m=10000:10000 5s13.9h
naive algorithm b: performn mTNR-queries
n=m=10000:10000 10000 1.7s=170s
better algorithm: exploithierarchicalnature of CH
S
T
8/12/2019 Transport Optimization Finland 2009
12/35
Sanders et al.: Route Planning 12
Many-to-Many Shortest Paths
performn forward-upwardsearches from eachsi
storethe distanced= (si,v)of each reached nodev in buckets
then performm backward-upwardsearches from eachtj
scanbuckets at each reached node
correctnessof CH ensures that
d(si,tj) = minvreached
((si,v) +(v,tj))
si tjsi, dd
. . .
v
8/12/2019 Transport Optimization Finland 2009
13/35
Sanders et al.: Route Planning 13
Ride Sharing
Current approaches:
match only ride offers withidenticalstart/destination (perfect fit)
sometimes radial search around start/destination
Our approach:
driver picks passenger up and gives him a ride to his destination
find the driver with theminimal detour(reasonable fit)
Efficient algorithm:
adaption of the many-to-many algorithm
matches a request to 100 000 offers in25 ms
8/12/2019 Transport Optimization Finland 2009
14/35
Sanders et al.: Route Planning 14
Turn Penalties
convert node-based graph toedge-based graph
applyspeedup technique, e.g. CH
Germany:1.812 minpreprocessing,200422squery
e1 e3
e4e2
e5 e6
e7
v1 v2 v3
v4
v1
e1
v3
e7
e2
e3
v2
e4
e5 e6
v4
node-based graph edge-based graph
8/12/2019 Transport Optimization Finland 2009
15/35
Sanders et al.: Route Planning 15
Dynamic Scenarios
change entirecost function
(e.g., use different speed profile)
change afew edge weights
(e.g., due to a traffic jam)
8/12/2019 Transport Optimization Finland 2009
16/35
Sanders et al.: Route Planning 16
Dynamic Scenarios
change afew edge weights
server scenario:if something changes,
updatethe preprocessed data structures
answermanysubsequent queries veryfast
mobile scenario:if something changes,
itdoes not payto update the data structures performsingleprudent query that
takes changed situation into account
8/12/2019 Transport Optimization Finland 2009
17/35
Sanders et al.: Route Planning 17
Mobile Contraction Hierarchies[ESA 08]
preprocess data on a personal computer
highly compressedblocked graph representation 8 bytes/node
compactroute reconstruction data structure + 8 bytes/node
experiments on a Nokia N800 at 400 MHz
cold querywith empty block cache 56ms
compute complete path 73ms
recomputation, e.g. if driver took the wrong exit 14ms
query after 1 000edge-weight changes, e.g. traffic jams 699 ms
8/12/2019 Transport Optimization Finland 2009
18/35
Sanders et al.: Route Planning 18
Time-Dependent Route Planning
edge weights aretravel time functions:
- {time of daytravel time}
- piecewise linear
- FIFO-propertywaiting does not help
query(s,t,0)start, target,departure time
looking for:
a fastest route froms totdependingon
0
Earliest ArrivalProblem
8/12/2019 Transport Optimization Finland 2009
19/35
Sanders et al.: Route Planning 19
Travel Time Functions
we need three operations
evaluation: f() O(1) time
merging:min(f,g) O(|f|+ |g|)time
chaining: f g(f afterg) O(|f|+ |g|)time
note:min(f,g)and f ghave O(|f|+ |g|)points each.
increase of complexity
g f
f * g
8/12/2019 Transport Optimization Finland 2009
20/35
Sanders et al.: Route Planning 20
Time-Dependent Dijkstra
Only onedifference to standard Dijkstra:
Cost of relaxed edge(u,v)depends...
...onshortest path tou.
s
v
u
21
8/12/2019 Transport Optimization Finland 2009
21/35
Sanders et al.: Route Planning 21
Profile Search
Modified Dijkstra:
Node labels are travel time functions
Edge relaxation: fnew:=min(fold,fu,v fu)
PQ key ismin fu
A label correctingalgorithm
fu,v
fu
fold
s
v
u
8/12/2019 Transport Optimization Finland 2009
22/35
Sanders et al.: Route Planning 22
Min-Max-Label Search
Approximate version of profile search:
Computesupperand lower bounds
Node labels are pairsmmu:= (minfu,maxfu)
Edge relaxation:
mmnew:=min(mmold,mmu+ (minfu,v,maxfu,v))
PQ key is the lower bound
A label correctingalgorithm
) =min( ,
fu,v
s
v
u
mm
mm
u
old
8/12/2019 Transport Optimization Finland 2009
23/35
Sanders et al.: Route Planning 23
Time-Dependent Contraction Hierarchies
two major challenges:
1. contractionduring precomputation
witnesses can be found byprofile search
...which isstraightforward
...butincredibly slow!
do somethingmore intelligent!
2. bidirectional search
problem: arrival timenot known
...but can besolved
8/12/2019 Transport Optimization Finland 2009
24/35
Sanders et al.: Route Planning 24
Restricted Profile Search
phase 1:restricts the search space
min-max-labelsearch
might already find awitness
if not:marka corridor of nodes:
initiallymarknodew
for each nodev markonly thosetwo predecessors
corresponding to the upper / lower bound
phase 2:profile searchonly usingmarkednodes
u
v
w
MinMaxLabel Search
Profile Search
8/12/2019 Transport Optimization Finland 2009
25/35
Sanders et al.: Route Planning 25
Bidirectional Time-Dependent Search
phase 1:two alternating searches:
forward:time-dependent Dijkstra
backward:min-max-label search
meeting points are candidates
phase 2:from allcandidates...
...do time-dependentmany-to-one forward Dijkstra
...only usingvisited edges
...using min/max distances toprunesearch
time = 0
s t
time = ?
u
8/12/2019 Transport Optimization Finland 2009
26/35
Sanders et al.: Route Planning 26
Experimental Comparision
PREPROCESSING QUERIES
time space time speed
input algorithm [h:m] [B/n] [ms] up
Germany TCH timed ord 1:48 + 0:14 743 1.19 1 242
midweek TCH min ord 0:05 + 0:20 1 029 1.22 1 212
Germany TCH timed ord. 0:38 + 0:07 177 1.07 1 321
Sunday TCH min ord. 0:05 + 0:06 248 0.71 1 980
8/12/2019 Transport Optimization Finland 2009
27/35
Sanders et al.: Route Planning 27
Parallel Precomputation
contraction:
contract maximum independent sets of nodes, i.e. nodes that are
least importantin their1 hop neighborhood, in parallel
add shortcuts even incase of equality
node order:
use the current priority terms in the priority queue
use2-3 hop neighborhoodfor good results
use priority terms thatrarely decreaseon update
6.5x speedup on 8 cores
8/12/2019 Transport Optimization Finland 2009
28/35
Sanders et al.: Route Planning 28
Summary
static routingin road networks is easy
applications that require massive amount or routing
instantaneous mobile routing
techniques for advanced models
time-dependentrouting is fast
bidirectional time-dependent search
fast queries
fast (parallel) precomputation
8/12/2019 Transport Optimization Finland 2009
29/35
Sanders et al.: Route Planning 29
Current / Future Work
Multiple objectivefunctions and restrictions (bridge height,. . . )
Multicriteriaoptimization (cost, time,. . . )
Integrate individual and public transportation
Other objectivesfor time-dependent travel
Routing driventraffic simulation
Real-timetraffic processing for optimal global routing
8/12/2019 Transport Optimization Finland 2009
30/35
Sanders et al.: Route Planning 30
Ultimate Routing in Road Networks?
Massive floating car data accurate current situation
Past data+traffic model+real time simulation
Nash euqilibrium predicting near future
time dependent routing in Nashequilibrium
realistic traffic-adaptive routing
Yet another step further
traffic steeringtowards a social optimum
8/12/2019 Transport Optimization Finland 2009
31/35
Sanders et al.: Route Planning 31
Macroscopic Traffic SimulationGoals:
fastsimulation of traffic in large road networks
basedon shortest paths
exploitspeedup techniques
Status of implementation:
timeindependentversion as student project
timedependentversion under development
Basis for equilibria computation
8/12/2019 Transport Optimization Finland 2009
32/35
Sanders et al.: Route Planning 32
Nash Equilibria in Road Networks
Computation:Iterativesimulation with adapted edge weights
Basic approach (simplified):
Permute set ofs t-pairs
For eachs t-pair (until equilibrium is reached)
-compute pathandupdate weightson its edges
Goals and applications:
Develop model fornear future predictionsof road traffic
Providerealistic traffic-adaptive routing
Traffic steering towardssocial optimum
8/12/2019 Transport Optimization Finland 2009
33/35
Sanders et al.: Route Planning 33
Multi-Criteria Routing
multipleoptimization criterias
e.g. distance, time, costs
flexibilityat route calculation time
e.g. individual vehicle speeds
diversityof results
e.g. calculate Pareto-optimal results
roundtripswith scenic value
e.g. for tourists
8/12/2019 Transport Optimization Finland 2009
34/35
Sanders et al.: Route Planning 34
Current State
adopt contraction hierarchies to multi-criteria:
modifiythe contraction so the query stays simple
add allnecessary shortcutsduring contraction
do this by modifying thelocal search
linear combination oftwo:x + aywitha[l,u]
label is now a function of x (see timedependent CH)
linear combination ofmore:a1x1+ + anxn withai[li,ui]
Pareto-optimal(may add too many shortcuts)
too many shortcutsneeded when done naive
8/12/2019 Transport Optimization Finland 2009
35/35
Sanders et al.: Route Planning 35
Challenges
current speedup-techniques largely rely onhierarchy
every optimization criterion has a specific influence on the
hierarchyof a road network
e.g. finding thefastestroute contains more hierarchy than finding
theshortestroute
however multiple criteriainterferewith hierarchy, but the algorithm
should workfastonlargegraphs
e.g. motorways drop in the hierarchy because of road tolls
new algorithmic ideas necessary
Recommended