java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.seqvar.NoOverlapSequence
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
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, viaNoOverlapLeftToRight. This ensures the same filtering strength as the standard no-overlap constraint.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoOverlapSequence(CPSeqVar seqVar, CPIntervalVar[] intervals, int[][] trans) Creates a NoOverlapSequence constraint. -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
NoOverlapSequence
Creates a NoOverlapSequence constraint.- Parameters:
seqVar- sequence variable withintervals.length + 2nodesintervals- theninterval variables to be sequenced (all must be present)trans-n×ntransition time matrix wheretrans[i][j]is the minimum transition time from interval i to interval j
-
-
Method Details
-
post
public void post()Description copied from interface:CPConstraintInitializes the constraint when it is posted to the solver.- Specified by:
postin interfaceCPConstraint- Overrides:
postin classAbstractCPConstraint
-
propagate
public void propagate()Description copied from interface:CPConstraintPropagates the constraint.- Specified by:
propagatein interfaceCPConstraint- Overrides:
propagatein classAbstractCPConstraint
-