Package org.ddolib.examples.mks
Class MKSDominance
java.lang.Object
org.ddolib.examples.mks.MKSDominance
Implements a dominance relation for Multi-dimensional Knapsack (MKS) states.
In this dominance relation, one state state1 is considered dominated by or equal to
another state state2 if, in every dimension, state1 has less than or equal
remaining capacity compared to state2.
This is useful for pruning the search space in decision diagram optimization: dominated states can be safely discarded without losing optimality.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MKSDominance
public MKSDominance()
-
-
Method Details
-
getKey
Returns a key for grouping states in dominance checks.Here, all states share the same key (0), meaning that all states are comparable for dominance against each other.
-
isDominatedOrEqual
Determines whetherstate1is dominated by or equal tostate2.state1is dominated if its remaining capacity in every dimension is less than or equal to the corresponding capacity instate2.- Specified by:
isDominatedOrEqualin interfaceDominance<MKSState>- Parameters:
state1- the first state to comparestate2- the second state to compare- Returns:
trueifstate1is dominated by or equal tostate2,falseotherwise
-