Class MispDominanceChecker

java.lang.Object
org.ddolib.layered.modeling.DominanceChecker<BitSet>
org.ddolib.examples.layered.misp.MispDominanceChecker

public class MispDominanceChecker extends DominanceChecker<BitSet>
Dominance checker of the Maximum Independent Set Problem (MISP), for the 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).

  • 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

      public boolean updateDominance(BitSet state, int depth, double objValue)
      Description copied from class: DominanceChecker
      Checks whether the input state is dominated and updates the front of non-dominated nodes.
      Specified by:
      updateDominance in class DominanceChecker<BitSet>
      Parameters:
      state - the state on which test dominance
      depth - the depth of the state in the MDD
      objValue - 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: DominanceChecker
      Clears the dominance checker state. This is useful for search algorithms that restart and need to clear previously cached dominance relations.
      Overrides:
      clear in class DominanceChecker<BitSet>