Class PDPTWFastLowerBound

java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWFastLowerBound
All Implemented Interfaces:
FastLowerBound<PDPTWState>

public class PDPTWFastLowerBound extends Object implements FastLowerBound<PDPTWState>
Implementation of a fast upper bound for the PDPTW.
  • Constructor Details

    • PDPTWFastLowerBound

      public PDPTWFastLowerBound(PDPTWProblem problem)
      Builds a fast lower bound calculator for the given PDPTW problem, precomputing the least incident edge of every node.
      Parameters:
      problem - the PDPTW problem to compute lower bounds for
  • Method Details

    • fastLowerBound

      public double fastLowerBound(PDPTWState state, Set<Integer> variables)
      Description copied from interface: FastLowerBound
      Returns a very rough estimation (upper bound) of the optimal value that could be reached if state were the initial state.
      Specified by:
      fastLowerBound in interface FastLowerBound<PDPTWState>
      Parameters:
      state - the state for which the estimate is to be computed
      variables - the set of unassigned variables
      Returns:
      A very rough estimation (upper bound) of the optimal value that could be reached if state were the initial state.
    • fastLowerBound

      public double fastLowerBound(PDPTWState state, int nbUnassignedVariables)
      Computes a fast lower bound on the remaining cost from the given state.

      The remaining cost is the arrival time at the depot minus the current time. Let m be the number of remaining hops, t the current time, pre[i] the sum of the i smallest incoming edges of the nodes to visit and e(j) their j-th smallest earliest start. The arrival time at the i-th next node is at least t + pre[i]. It is also at least max(t, e(j)) + pre[i - j] for every j <= i: at least i - j + 1 of the first i visited nodes cannot be served before e(j), the first of them is visited at position j or before, and at least i - j hops follow it.

      On a merged state, the set of nodes to visit may contain more nodes than the number of remaining hops: the bounds are then computed on all of them, which can only decrease them.

      Parameters:
      state - the current state
      nbUnassignedVariables - the number of variables (nodes) still to visit, including the final return to the depot
      Returns:
      the lower bound on the remaining cost, or Double.POSITIVE_INFINITY if no feasible completion respecting the time windows exists