public class AStarBidirection extends AbstractBidirAlgo implements RecalculationHook
See http://research.microsoft.com/apps/pubs/default.aspx?id=64511 http://i11www.iti.uni-karlsruhe.de/_media/teaching/sommer2012/routenplanung/vorlesung4.pdf http://research.microsoft.com/pubs/64504/goldberg-sofsem07.pdf http://www.cs.princeton.edu/courses/archive/spr06/cos423/Handouts/EPP%20shortest%20path%20algorithms.pdf
and
1. Ikeda, T., Hsu, M.-Y., Imai, H., Nishimura, S., Shimoura, H., Hashimoto, T., Tenmoku, K., and Mitoh, K. (1994). A fast algorithm for finding better routes by ai search techniques. In VNIS, pages 291–296.
2. Whangbo, T. K. (2007). Efficient modified bidirectional a* algorithm for optimal route- finding. In IEA/AIE, volume 4570, pages 344–353. Springer.
or could we even use this three phase approach? www.lix.polytechnique.fr/~giacomon/papers/bidirtimedep.pdf
| Modifier and Type | Field and Description |
|---|---|
protected PathBidirRef |
bestPath |
protected com.carrotsearch.hppc.IntObjectMap<AStar.AStarEntry> |
bestWeightMapFrom |
protected com.carrotsearch.hppc.IntObjectMap<AStar.AStarEntry> |
bestWeightMapTo |
protected AStar.AStarEntry |
currFrom |
protected AStar.AStarEntry |
currTo |
finishedFrom, finishedToflagEncoder, graph, inEdgeExplorer, maxVisitedNodes, nodeAccess, outEdgeExplorer, traversalMode, weighting| Constructor and Description |
|---|
AStarBidirection(Graph graph,
Weighting weighting,
TraversalMode tMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterHeuristicChange(boolean forward,
boolean backward)
Call this method after the heuristic has changed and graph exploration should continue.
|
protected Path |
createAndInitPath() |
protected SPTEntry |
createSPTEntry(int node,
double weight) |
protected Path |
extractPath()
To be overwritten from extending class.
|
protected boolean |
finished()
To be overwritten from extending class.
|
WeightApproximator |
getApproximation() |
protected double |
getCurrentFromWeight() |
protected double |
getCurrentToWeight() |
String |
getName() |
protected void |
initCollections(int size) |
void |
initFrom(int from,
double weight) |
void |
initTo(int to,
double weight) |
AStarBidirection |
setApproximation(WeightApproximator approx) |
void |
updateBestPath(EdgeIteratorState edgeState,
AStar.AStarEntry entryCurrent,
int currLoc) |
calcPath, getVisitedNodes, runAlgoaccept, calcPaths, checkAlreadyRun, createEmptyPath, isMaxVisitedNodesExceeded, setEdgeFilter, setMaxVisitedNodes, toString, updateBestPathclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetVisitedNodesprotected AStar.AStarEntry currFrom
protected AStar.AStarEntry currTo
protected PathBidirRef bestPath
protected com.carrotsearch.hppc.IntObjectMap<AStar.AStarEntry> bestWeightMapFrom
protected com.carrotsearch.hppc.IntObjectMap<AStar.AStarEntry> bestWeightMapTo
public AStarBidirection(Graph graph, Weighting weighting, TraversalMode tMode)
protected void initCollections(int size)
public AStarBidirection setApproximation(WeightApproximator approx)
approx - if true it enables approximate distance calculation from lat,lon valuespublic WeightApproximator getApproximation()
protected SPTEntry createSPTEntry(int node, double weight)
createSPTEntry in class AbstractRoutingAlgorithmpublic void initFrom(int from,
double weight)
public void initTo(int to,
double weight)
protected Path createAndInitPath()
createAndInitPath in class AbstractBidirAlgoprotected Path extractPath()
AbstractRoutingAlgorithmextractPath in class AbstractRoutingAlgorithmprotected double getCurrentFromWeight()
getCurrentFromWeight in class AbstractBidirAlgoprotected double getCurrentToWeight()
getCurrentToWeight in class AbstractBidirAlgoprotected boolean finished()
AbstractRoutingAlgorithmfinished in class AbstractRoutingAlgorithmpublic void updateBestPath(EdgeIteratorState edgeState, AStar.AStarEntry entryCurrent, int currLoc)
public void afterHeuristicChange(boolean forward,
boolean backward)
RecalculationHookafterHeuristicChange in interface RecalculationHookpublic String getName()
getName in interface RoutingAlgorithmgetName in class AbstractRoutingAlgorithmCopyright © 2012–2018. All rights reserved.