900 likes | 1.69k Views
Route Planning. Vehicle navigation systems, Dijkstra’s algorithm, bidirectional search, transit-node routing. Vehicle navigation systems. Main tasks: positioning : locating the vehicle using GPS and/or dead reckoning with distance and heading sensors
E N D
Route Planning Vehicle navigation systems, Dijkstra’s algorithm, bidirectional search, transit-node routing
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
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
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
Guiding • Top view, perspective view, overview • Schematic information on exit lanes • Spoken directions Largely an HCI issue
Routing • Based on Dijkstra’s shortest path algorithm • Many improvements to deal with huge networks • Improvements use preprocessing
Routing • Based on Dijkstra’s shortest path algorithm • Many improvements to deal with huge networks • Improvements use preprocessing
Routing • Based on Dijkstra’s shortest path algorithm • Many improvements to deal with huge networks • Improvements use preprocessing Bidirectional search (from Bayreuth and from Erlangen)
Routing • Based on Dijkstra’s shortest path algorithm • Many improvements to deal with huge networks • Improvements use preprocessing Bidirectional search (from Bayreuth and from Erlangen)
Routing • Dijkstra’s algorithm takes O(n + m log m) time for a graph with n nodes and m edges 1 2 10 6 9 4 2 3 9 7 6 5 2
Routing • Dijkstra’s algorithm takes O(n + m log m) time for a graph with n nodes and m edges 1 2 10 6 9 4 2 3 0 9 7 6 5 2
Routing • Dijkstra’s algorithm takes O(n + m log m) time for a graph with n nodes and m edges 1 2 10 6 9 4 2 3 0 9 7 6 5 2
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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
Routing • Dijkstra’s algorithm takes O(n + m log m) 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 • Nodes are stored by distance in a Fibonacci heap (it allows for a very efficient decrease-value operation) • Road networks have m = O(n), so it takes O(n log n) time
Routing • Very fast shortest path queries are needed in vehicle navigation systems and by Google Maps • Idea: pre-compute the shortest path for every pair of nodes and store it in a tableX much too much storage needed • Need other ways to answer shortest path queries faster • Highway hierarchies • Transit-node routing
Transit-Node Routing • For a real road network, there exists a relatively small set of nodes, such that any shortest path of sufficient length will pass at least one of them • For the Netherlands, every shortest path of at least 100 km will use a highway, so we can take all highway exits
60 km Highways and other major roads; every shortest path in the original road network of at least 60 km will use a highway or other major road
Transit-Node Routing • This relatively small set of nodes is called the set of transit nodes • Furthermore, for every node, there are (typically) only few nodes that are the first transit nodes encountered when going far enough (access nodes) • For the USA, the road network has 24 million nodes and 58 million edges • Transit-node routing uses 10,000 transit nodes and for each node there are ~10 access nodes
Transit-Node Routing • Store all distances between two transit nodes in a table • For every node, store the distance to its ~10 access nodes in a table • Use table look-up to determine shortest paths, if the distance between source and target is large enough • for the source and target, get the access nodes and distances • for every pair [access node of source, access node of target], determine a candidate path length by 3 table look-ups • If the distance is small, just run Dijkstra bidirectional
V : nodes of the input graph T : transit nodes chosen access node table/list nodes of V transit nodes access nodes of i i transit node table transit nodes
Transit-Node Routing • Trade-off: many transit nodes: fast query time, large storage requirements, high preprocessing timefew transit nodes: slower query time, smaller storage requirements, lower preprocessing time • Reported (road network USA):query time: 5 – 63 sstorage: 21 – 244 bytes/nodepreprocessing: 59 – 1200 minutes
Transit-Node Routing • Need (for preprocessing): • a way to choose transit-nodes • a way to determine access nodes • a way to compute the transit node table and access node table • Need (at query time): • a way to decide if a query is local ( use Dijkstra)or not ( use table look-up) • a way to retrieve the shortest path itself
Choosing transit nodes • Use grid-based partition and use intersections of the network and the grid
Choosing transit nodes • Use grid-based partition and use intersections of the network and the grid • Select nodes from Vinner based on whether they lie on some shortest path from a node in C to Vouter outer inner C
Choosing transit nodes • Consider every center square C • Use 5 x 5 squares to define Vinner • Use 9 x 9 squares to define Vouter • Consider all paths from some node in C to some node in Vouter • All nodes of Vinner on such a path will go in the set of transit nodes (eventually united over all C) • Run Dijkstra from every node in C until all nodes in Vouter are settled
Choosing transit nodes • Given s and t, if they are more than 4 grid cells apart (horizontally or vertically), their shortest path must contain a transit node • This provides an easy test for locality of any query (later, during query time)
Computing access nodes • For each transit node u, run Dijkstra until all shortest paths from u pass another transit node • Every node v in the shortest path tree from u before another transit node is reached gets u as one of its access nodes u shortest path tree from u v
Computing the tables • The access node table is automatically computed when the access nodes are determined • Distances between “near” transit nodes are also computed transit node graph • Dijkstra on the transit node graph gives the transit node table
Summary • Vehicle navigation systems rely on positioning, routing, and guidance • Route planning relies on Dijkstra’s algorithm and techniques to speed up queries, like preprocessing using the transit nodes idea