Package org.opentcs.components.kernel.routing

# Interface EdgeEvaluator

    public interface EdgeEvaluator

Computes the weight of edges in the routing graph.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `double` | `computeWeight​(Edge edge, Vehicle vehicle)` | Computes the weight of an edge in the routing graph.
  `default void` | `onGraphComputationEnd​(Vehicle vehicle)` | Called when/after a computation of a routing graph is done.
  `default void` | `onGraphComputationStart​(Vehicle vehicle)` | Called when/before computation of a routing graph starts.

- ## Method Details

  - ### onGraphComputationStart

    @ScheduledApiChange(details="Default implementation will be removed.", when="6.0") default void onGraphComputationStart​(@Nonnull Vehicle vehicle)
    Called when/before computation of a routing graph starts.
    Parameters:
      `vehicle` - The vehicle for which the routing graph is computed.

  - ### onGraphComputationEnd

    @ScheduledApiChange(details="Default implementation will be removed.", when="6.0") default void onGraphComputationEnd​(@Nonnull Vehicle vehicle)
    Called when/after a computation of a routing graph is done.
    Parameters:
      `vehicle` - The vehicle for which the routing graph is computed.

  - ### computeWeight

    double computeWeight​(@Nonnull Edge edge, @Nonnull Vehicle vehicle)
    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_INFINITY` indicates that the edge is to be excluded from routing. Note that negative weights might not be handled well by the respective routing algorithm used.