Class PDPTWFastLowerBound
java.lang.Object
org.ddolib.examples.layered.pdptw.PDPTWFastLowerBound
- All Implemented Interfaces:
FastLowerBound<PDPTWState>
Implementation of a fast upper bound for the PDPTW.
-
Constructor Summary
ConstructorsConstructorDescriptionPDPTWFastLowerBound(PDPTWProblem problem) Builds a fast lower bound calculator for the given PDPTW problem, precomputing the least incident edge of every node. -
Method Summary
Modifier and TypeMethodDescriptiondoublefastLowerBound(PDPTWState state, int nbUnassignedVariables) Computes a fast lower bound on the remaining cost from the given state.doublefastLowerBound(PDPTWState state, Set<Integer> variables) Returns a very rough estimation (upper bound) of the optimal value that could be reached if state were the initial state.
-
Constructor Details
-
PDPTWFastLowerBound
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
Description copied from interface:FastLowerBoundReturns a very rough estimation (upper bound) of the optimal value that could be reached if state were the initial state.- Specified by:
fastLowerBoundin interfaceFastLowerBound<PDPTWState>- Parameters:
state- the state for which the estimate is to be computedvariables- 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
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
mbe the number of remaining hops,tthe current time,pre[i]the sum of theismallest incoming edges of the nodes to visit ande(j)theirj-th smallest earliest start. The arrival time at thei-th next node is at leastt + pre[i]. It is also at leastmax(t, e(j)) + pre[i - j]for everyj <= i: at leasti - j + 1of the firstivisited nodes cannot be served beforee(j), the first of them is visited at positionjor before, and at leasti - jhops 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 statenbUnassignedVariables- 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_INFINITYif no feasible completion respecting the time windows exists
-