public class PrepareContractionHierarchies extends AbstractAlgoPreparation implements RoutingAlgorithmFactory
There are several descriptions of contraction hierarchies available. The following is one of the more detailed: http://web.cs.du.edu/~sturtevant/papers/highlevelpathfinding.pdf
The only difference is that we use two skipped edges instead of one skipped node for faster unpacking.
| Constructor and Description |
|---|
PrepareContractionHierarchies(Directory dir,
GraphHopperStorage ghStorage,
CHGraph chGraph,
Weighting weighting,
TraversalMode traversalMode) |
| Modifier and Type | Method and Description |
|---|---|
RoutingAlgorithm |
createAlgo(Graph graph,
AlgorithmOptions opts)
This method creates an algorithm out of this factory based on the specified opts and graph.
|
void |
doSpecificWork() |
long |
getDijkstraCount() |
double |
getLazyTime() |
double |
getNeighborTime() |
double |
getPeriodTime() |
long |
getShortcuts() |
Weighting |
getWeighting() |
protected void |
runGraphContraction() |
PrepareContractionHierarchies |
setContractedNodes(double nodesContracted)
Define how many nodes (percentage) should be contracted.
|
PrepareContractionHierarchies |
setLazyUpdates(int lazyUpdates) |
PrepareContractionHierarchies |
setLogMessages(double logMessages)
Specifies how often a log message should be printed.
|
PrepareContractionHierarchies |
setNeighborUpdates(int neighborUpdates) |
PrepareContractionHierarchies |
setPeriodicUpdates(int periodicUpdates)
The higher the values are the longer the preparation takes but the less shortcuts are
produced.
|
String |
toString() |
doWork, isPreparedpublic PrepareContractionHierarchies(Directory dir, GraphHopperStorage ghStorage, CHGraph chGraph, Weighting weighting, TraversalMode traversalMode)
public PrepareContractionHierarchies setPeriodicUpdates(int periodicUpdates)
periodicUpdates - specifies how often periodic updates will happen. Use something less
than 10.public PrepareContractionHierarchies setLazyUpdates(int lazyUpdates)
lazyUpdates - specifies when lazy updates will happen, measured relative to all existing
nodes. 100 means always.public PrepareContractionHierarchies setNeighborUpdates(int neighborUpdates)
neighborUpdates - specifies how often neighbor updates will happen. 100 means always.public PrepareContractionHierarchies setLogMessages(double logMessages)
public PrepareContractionHierarchies setContractedNodes(double nodesContracted)
public void doSpecificWork()
doSpecificWork in class AbstractAlgoPreparationprotected void runGraphContraction()
public RoutingAlgorithm createAlgo(Graph graph, AlgorithmOptions opts)
RoutingAlgorithmFactorycreateAlgo in interface RoutingAlgorithmFactorypublic long getDijkstraCount()
public long getShortcuts()
public double getLazyTime()
public double getPeriodTime()
public double getNeighborTime()
public Weighting getWeighting()
Copyright © 2012–2018. All rights reserved.