public class AlternativeRoute extends AStarBidirection implements RoutingAlgorithm
Note: This algorithm can be slow for longer routes and alternatives are only really practical in combination with CH, see #2566
Modifier and Type | Class and Description |
---|---|
static class |
AlternativeRoute.AlternativeInfo |
additionalEdgeFilter, edgeExplorer, graph, nodeAccess, weighting
bestBwdEntry, bestFwdEntry, bestWeight, bestWeightMapFrom, bestWeightMapOther, bestWeightMapTo, currFrom, currTo, finishedFrom, finishedTo, from, fromOutEdge, maxVisitedNodes, to, toInEdge, traversalMode, updateBestPath
Constructor and Description |
---|
AlternativeRoute(Graph graph,
Weighting weighting,
TraversalMode traversalMode,
PMap hints) |
Modifier and Type | Method and Description |
---|---|
List<AlternativeRoute.AlternativeInfo> |
calcAlternatives(int from,
int to) |
List<AlternativeRoute.AlternativeInfo> |
calcAlternatives(Path bestPath,
int maxPaths,
double maxWeightFactor,
double weightInfluence,
double maxShareFactor,
double shareInfluence,
double minPlateauFactor,
double plateauInfluence) |
List<Path> |
calcPaths(int from,
int to)
Calculates multiple possibilities for a path.
|
boolean |
finished() |
String |
getName() |
Path |
searchBest(int from,
int to) |
void |
setMaxVisitedNodes(int numberOfNodes)
Limit the search to numberOfNodes.
|
calcWeight, createEntry, createStartEntry, getApproximation, setApproximation
accept, createEmptyPath, createPathExtractor, extractPath, fillEdgesFromUsingFilter, fillEdgesToUsingFilter, getInEdgeWeight, postInitFrom, postInitTo, toString
bwdSearchCanBeStopped, calcPath, calcPath, checkAlreadyRun, fromEntryCanBeSkipped, fwdSearchCanBeStopped, getCurrentFromWeight, getCurrentToWeight, getIncomingEdge, getVisitedNodes, initCollections, initFrom, initTo, isMaxVisitedNodesExceeded, postInit, runAlgo, setUpdateBestPath, toEntryCanBeSkipped, updateBestPath
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
calcPath, getVisitedNodes
calcPath
public AlternativeRoute(Graph graph, Weighting weighting, TraversalMode traversalMode, PMap hints)
public void setMaxVisitedNodes(int numberOfNodes)
RoutingAlgorithm
setMaxVisitedNodes
in interface RoutingAlgorithm
setMaxVisitedNodes
in class AbstractBidirAlgo
public List<AlternativeRoute.AlternativeInfo> calcAlternatives(int from, int to)
public List<Path> calcPaths(int from, int to)
RoutingAlgorithm
calcPaths
in interface RoutingAlgorithm
calcPaths
in class AbstractBidirAlgo
RoutingAlgorithm.calcPath(int, int)
public String getName()
getName
in interface RoutingAlgorithm
getName
in class AStarBidirection
public boolean finished()
finished
in class AStarBidirection
public Path searchBest(int from, int to)
public List<AlternativeRoute.AlternativeInfo> calcAlternatives(Path bestPath, int maxPaths, double maxWeightFactor, double weightInfluence, double maxShareFactor, double shareInfluence, double minPlateauFactor, double plateauInfluence)
Copyright © 2012–2022. All rights reserved.