public class FastestWeighting extends AbstractWeighting
Modifier and Type | Field and Description |
---|---|
static String |
DESTINATION_FACTOR |
static String |
PRIVATE_FACTOR |
protected static double |
SPEED_CONV
Converting to seconds is not necessary but makes adding other penalties easier (e.g.
|
accessEnc, speedEnc
INFINITE_U_TURN_COSTS
Constructor and Description |
---|
FastestWeighting(BooleanEncodedValue accessEnc,
DecimalEncodedValue speedEnc) |
FastestWeighting(BooleanEncodedValue accessEnc,
DecimalEncodedValue speedEnc,
EnumEncodedValue<RoadAccess> roadAccessEnc,
PMap map,
TurnCostProvider turnCostProvider) |
FastestWeighting(BooleanEncodedValue accessEnc,
DecimalEncodedValue speedEnc,
TurnCostProvider turnCostProvider) |
Modifier and Type | Method and Description |
---|---|
long |
calcEdgeMillis(EdgeIteratorState edgeState,
boolean reverse)
This method calculates the time taken (in milli seconds) to travel along the specified edgeState.
|
double |
calcEdgeWeight(EdgeIteratorState edgeState,
boolean reverse)
In most cases subclasses should only override this method to change the edge-weight.
|
double |
getMinWeight(double distance)
Used only for the heuristic estimation in A*
|
String |
getName() |
calcTurnMillis, calcTurnWeight, edgeHasNoAccess, getTurnCostProvider, hasTurnCosts, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
calcEdgeWeightWithAccess
public static String DESTINATION_FACTOR
public static String PRIVATE_FACTOR
protected static final double SPEED_CONV
public FastestWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc)
public FastestWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, TurnCostProvider turnCostProvider)
public FastestWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, EnumEncodedValue<RoadAccess> roadAccessEnc, PMap map, TurnCostProvider turnCostProvider)
public double getMinWeight(double distance)
Weighting
public double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse)
AbstractWeighting
TurnCostProvider
implementation to the constructor instead.calcEdgeWeight
in interface Weighting
calcEdgeWeight
in class AbstractWeighting
edgeState
- the edge for which the weight should be calculatedreverse
- if the specified edge is specified in reverse direction e.g. from the reverse
case of a bidirectional search.public long calcEdgeMillis(EdgeIteratorState edgeState, boolean reverse)
Weighting
calcEdgeMillis
in interface Weighting
calcEdgeMillis
in class AbstractWeighting
public String getName()
Copyright © 2012–2022. All rights reserved.