java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.scheduling.IntervalVarLength
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Constraint linking the length (duration) of an interval variable
var to an integer variable length.- Author:
- Charles Thomas
-
Constructor Summary
ConstructorsConstructorDescriptionIntervalVarLength(CPIntervalVar var, CPIntVar length) Creates a constraint linkinglength(var)tolength. -
Method Summary
Methods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
IntervalVarLength
Creates a constraint linkinglength(var)tolength.- Parameters:
var- the interval variablelength- the integer variable representing the length ofvar
-
-
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
-