Module org.maxicp

Class NoOverlapSequence

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

public class NoOverlapSequence extends AbstractCPConstraint
Channels a CPSeqVar with an array of CPIntervalVar and enforces a no-overlap with minimum transition times between consecutive intervals.

The sequence variable has n+2 nodes: nodes 0..n-1 correspond to the n intervals, node n is the dummy start, and node n+1 is the dummy end. The dummy start and end are mandatory members of the sequence. The dummy intervals (length 0, start fixed at 0 / latest end) are created internally and are not exposed to the user.

The transition time matrix is n×n (user-provided). Internally it is extended to (n+2)×(n+2) with zero transitions to/from the dummy nodes.

The constraint combines two filtering approaches:

  • Sequence-based filtering: forward/backward time window propagation along the member chain, insertion filtering for insertable nodes, and position-based reasoning from the sequence structure.
  • Scheduling-based filtering: the same overload checking, detectable precedences, not-last, and edge-finding algorithms as NoOverlap, via NoOverlapLeftToRight. This ensures the same filtering strength as the standard no-overlap constraint.
See Also:
  • Constructor Details

    • NoOverlapSequence

      public NoOverlapSequence(CPSeqVar seqVar, CPIntervalVar[] intervals, int[][] trans)
      Creates a NoOverlapSequence constraint.
      Parameters:
      seqVar - sequence variable with intervals.length + 2 nodes
      intervals - the n interval variables to be sequenced (all must be present)
      trans - n×n transition time matrix where trans[i][j] is the minimum transition time from interval i to interval j
  • Method Details