Content deleted Content added
No edit summary |
m Moving Category:Algorithms in graph theory to Category:Graph algorithms per Wikipedia:Categories for discussion/Log/2024 October 4 |
||
(26 intermediate revisions by 12 users not shown) | |||
Line 1:
In [[applied mathematics]], '''transit node routing''' can be used to speed up [[Shortest path routing|shortest-path routing]] by pre-computing connections between common access nodes to a sub-network relevant to long-distance travel.<ref name=":0">{{Cite journal|
Transit node routing as a framework was established in 2007<ref name=":0" /> and many concrete implementations have surfaced in the years after such as approaches using grids, highway hierarchies<ref name=":1" /> and [[contraction hierarchies]].<ref name=":2" /> Transit node routing is a static approach that requires pre-processing of pair-wise distances between important nodes in the graph (see below how those nodes are chosen). A dynamic approach has not been published.<ref>{{Citation|last1=Schultes|first1=Dominik|chapter=Dynamic Highway-Node Routing|pages=66–79|publisher=Springer Berlin Heidelberg|isbn=9783540728443|last2=Sanders|first2=Peter|doi=10.1007/978-3-540-72845-0_6|title=Experimental Algorithms|volume=4525|series=Lecture Notes in Computer Science|year=2007}}</ref>
__TOC__
== Intuition ==
[[File:Transit node routing intuition.gif|thumb|Multiple routes using the same access nodes to long-distance road network.]]
Long-distance travel usually involves driving along a
Because the number of such access nodes is small compared to the overall number of nodes in a road network, all shortest routes connecting those nodes with each other can be pre-calculated and stored. When calculating a shortest path therefore only routes to access nodes close to start and target ___location need to be calculated.
{{Clear}}
== General framework ==
# Transit node routing starts with a selection of transit nodes <math>T \subseteq V</math> as a subset of all nodes <math>V</math> of the road network.
# For every node <math>v \in V</math> dedicated sets of forward access
# Now, pairwise distances between transit nodes <math>D_T</math> and distances between nodes <math>v</math> and their corresponding access
# A distance between two nodes can now be calculated as <math>d(s,t) = \min_{u \in \overrightarrow{A}(s), v \in \overleftarrow{A}(t)}d_A(s,u) + D_T(u,v) + d_A(v,t)</math>
Line 23 ⟶ 28:
Transit node routing is not an algorithm but merely a framework for speeding up route planning. The general framework leaves open a few questions that need to be answered to implement it:
* How are transit
* How are access
* Which locality filter should be used?
* How should local queries be handled?
=== Geometrical approach using grids===
In a [[Grid (spatial index)|grid]]-based approach, the [[Minimum bounding box|bounding]] square of all nodes is equally subdivided into square cells.
'''How are access
[[File:Grid based transit node routing.png|thumb|Access nodes (red dots) for a cell C (red) with inner area I (orange) and outer area O (blue)]]
For each cell <math>C</math>, a set of access nodes can be found by looking at an inner area <math>I</math> of 5x5 cells and an outer area <math>O</math> of 9x9 cells around <math>C</math>. Focusing on crossing nodes (ends of edges that cross the boundary of <math>C</math>, <math>I</math> or <math>O</math>), the access nodes for <math>C</math> are those nodes of <math>I</math> that are part of a shortest path from some node in <math>C</math> to a node in <math>O</math>. As access nodes for an arbitrary node <math>
▲For each cell <math>C</math>, a set of access nodes can be found by looking at an inner area <math>I</math> of 5x5 cells and an outer area <math>O</math> of 9x9 cells around <math>C</math>. Focusing on crossing nodes (ends of edges that cross the boundary of <math>C</math>,<math>I</math>or <math>O</math>), the access nodes for <math>C</math>are those nodes of <math>I</math>that are part of a shortest path from some node in <math>C</math>to a node in <math>O</math>. As access nodes for an arbitrary node <math>n</math> all access nodes of the cell containing <math>n</math>are chosen.
▲'''How are transit-nodes selected?'''
▲The set of transit nodes is exactly the union of all sets of access-nodes.
'''Which locality filter should be used?'''
The way access
'''How should local queries be handled?'''
Line 47 ⟶ 54:
Local queries are only needed if start and target already lie close together, therefore every suitable shortest-path algorithm such as [[Dijkstra's algorithm]] or extensions thereof can be chosen.
==== Space requirements ====
The pre-computed distances between each node and the corresponding access node as well as the pairwise distances between transit nodes need to be stored in distance tables.
'''How are transit-nodes selected?'''▼
In the grid-based implementation outlined above, this results in 16 bytes of storage that is required for each node of the road graph. A full graph of the USA road network has 23,947,347 nodes.<ref>{{Cite web|url=http://users.diag.uniroma1.it/challenge9/download.shtml|title=9th DIMACS Implementation Challenge: Shortest Paths|website=users.diag.uniroma1.it|access-date=2019-07-15}}</ref> Therefore approx. 383 MB of storage would be required to store the distance tables.
By definition, a [[Contraction hierarchies|contraction hierarchy]] moves important nodes (i.e. nodes that are part of many shortest paths) to the top of the hierarchy. A set of transit-nodes therefore can be selected as the <math>k</math>highest nodes of the contraction hierarchy.▼
=== Using contraction hierarchies===
'''How are access-nodes selected?'''▼
▲By definition, a [[Contraction hierarchies|contraction hierarchy]] moves important nodes (i.e. nodes that are part of many shortest paths) to the top of the hierarchy. A set of transit
Forward access-nodes of a node <math>n</math>can be found by running the upward-search of the contraction hierarchy starting at <math>n</math>. During the upward-search, edges leaving previously found transit nodes aren't relaxed. When the search has no more upward nodes left to settle, those transit-nodes that have been settled are the access-nodes of <math>n</math>. Backward access-nodes can be found analogously. ▼
▲Forward access
'''Which locality filter should be used?'''
If the highest node of a shortest up-down-path in the hierarchy is not part of the set of transit nodes, then the query was local. This implies that neither the up-part of the path (beginning at the starting node) nor the down-part of the path (ending at the target node) can contain a transit
'''How should local queries be handled?'''
Line 69 ⟶ 81:
* [[Hub labels]]
* [[Bidirectional search]]
* [[Highway dimension]]
==References==
{{reflist}}
[[Category:Routing algorithms]]
[[Category:Graph algorithms]]
|