Interface EdgeEvaluator
public interface EdgeEvaluator
Computes the weight of edges in the routing graph.
-
Method Summary
Modifier and TypeMethodDescriptiondoublecomputeWeight(Edge edge, Vehicle vehicle) Computes the weight of an edge in the routing graph.voidonGraphComputationEnd(Vehicle vehicle) Called when/after a computation of a routing graph is done.voidonGraphComputationStart(Vehicle vehicle) Called when/before computation of a routing graph starts.
-
Method Details
-
onGraphComputationStart
Called when/before computation of a routing graph starts.- Parameters:
vehicle- The vehicle for which the routing graph is computed.
-
onGraphComputationEnd
Called when/after a computation of a routing graph is done.- Parameters:
vehicle- The vehicle for which the routing graph is computed.
-
computeWeight
Computes the weight of an edge in the routing graph.- Parameters:
edge- The edge.vehicle- The vehicle for which to compute the edge's weight.- Returns:
- The computed weight of the given edge.
A value of
Double.POSITIVE_INFINITYindicates that the edge is to be excluded from routing. Note that negative weights might not be handled well by the respective routing algorithm used.
-