Package org.ddolib.examples.mks
Class MKSFastLowerBound
java.lang.Object
org.ddolib.examples.mks.MKSFastLowerBound
- All Implemented Interfaces:
FastLowerBound<MKSState>
Provides a fast lower bound estimation for Multi-dimensional Knapsack (MKS) states.
This class implements FastLowerBound and computes a simple, fast lower bound
on the negative total profit that can be achieved by a given set of variables (items).
The lower bound does not consider capacities or interactions between dimensions,
but only sums the profits of the candidate items.
-
Constructor Summary
ConstructorsConstructorDescriptionMKSFastLowerBound(MKSProblem problem) Constructs a fast lower bound evaluator for the given MKS problem. -
Method Summary
Modifier and TypeMethodDescriptiondoublefastLowerBound(MKSState state, Set<Integer> variables) Computes a fast lower bound for a given state and a set of variables (items).
-
Constructor Details
-
MKSFastLowerBound
Constructs a fast lower bound evaluator for the given MKS problem.- Parameters:
problem- the multi-dimensional knapsack problem
-
-
Method Details
-
fastLowerBound
Computes a fast lower bound for a given state and a set of variables (items).The bound is calculated as the negated sum of the profits of the variables, ignoring capacity constraints.
- Specified by:
fastLowerBoundin interfaceFastLowerBound<MKSState>- Parameters:
state- the current MKS statevariables- the set of variable indices (items) to consider- Returns:
- a lower bound on the cost (negative total profit) achievable
-