Class MispDominanceChecker
MispDominance
relation: a state is dominated by a state with a better or equal value whose set of remaining
vertices includes its own.
The dominance by inclusion forbids grouping the states by a key (see MispDominance.getKey(java.util.BitSet)), so that a SimpleDominanceChecker compares each new state with
all the states of its layer. This checker groups the states of a layer by their number of
remaining vertices instead: a set can only be included in a set with at least as many
vertices. A new state is thus only compared with the states having at least as many remaining
vertices to know if it is dominated, and with the states having at most as many remaining
vertices to remove the ones it dominates.
It prunes exactly the same states as a SimpleDominanceChecker with a MispDominance. The states are not copied: they must not be modified after their creation,
which is the case of the states built by MispProblem.transition(java.util.BitSet, org.ddolib.layered.solving.ddo.core.Decision).
-
Field Summary
Fields inherited from class org.ddolib.layered.modeling.DominanceChecker
dominance -
Constructor Summary
ConstructorsConstructorDescriptionMispDominanceChecker(int nbVars) Creates a dominance checker for a problem with the given number of variables. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the dominance checker state.booleanupdateDominance(BitSet state, int depth, double objValue) Checks whether the input state is dominated and updates the front of non-dominated nodes.
-
Constructor Details
-
MispDominanceChecker
public MispDominanceChecker(int nbVars) Creates a dominance checker for a problem with the given number of variables.- Parameters:
nbVars- the number of variables of the problem
-
-
Method Details
-
updateDominance
Description copied from class:DominanceCheckerChecks whether the input state is dominated and updates the front of non-dominated nodes.- Specified by:
updateDominancein classDominanceChecker<BitSet>- Parameters:
state- the state on which test dominancedepth- the depth of the state in the MDDobjValue- the length of the longest path from the root to the input state- Returns:
- whether the input state is dominated
-
clear
public void clear()Description copied from class:DominanceCheckerClears the dominance checker state. This is useful for search algorithms that restart and need to clear previously cached dominance relations.- Overrides:
clearin classDominanceChecker<BitSet>
-