Module org.maxicp

Class RelaxedSequence

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.seqvar.RelaxedSequence
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class RelaxedSequence extends AbstractCPConstraint
Imposes that the sequence defined by the provided orderedSequence where the relaxed nodes have been removed is a subsequence of the provided sequence variable. This constraint is useful for Large Neighborhood Search to restrict some subsequence on the next restart.
  • Constructor Details

    • RelaxedSequence

      public RelaxedSequence(CPSeqVar sequence, int[] orderedSequence, Set<Integer> relaxed)
      Creates a constraint imposing the non-relaxed nodes of orderedSequence onto sequence.
      Parameters:
      sequence - the sequence variable
      orderedSequence - an ordered array of nodes starting with sequence.start() and ending with sequence.end()
      relaxed - the set of nodes from orderedSequence that are relaxed (not forced to be inserted)
  • Method Details