Uses of Interface
org.maxicp.cp.engine.core.CPConstraint
Packages that use CPConstraint
Package
Description
Constraint Programming Solver Implementation
Constraints implementation (propagators)
Constraints implementation for Scheduling over Interval Variables and Cumulative Functions
Constraints implementation for Sequence Variables
Constraints implementation for Set Variables
Solver objects
-
Uses of CPConstraint in org.maxicp.cp
Methods in org.maxicp.cp that return CPConstraintModifier and TypeMethodDescriptionstatic CPConstraintCPFactory.absent(CPIntervalVar var1) Create a constraint that enforces an interval to be absentstatic CPConstraintCPFactory.allDifferent(CPIntVar[] x) Returns an allDifferent constraint using forward checking algostatic CPConstraintCPFactory.allDifferentDC(CPIntVar[] x) Returns an allDifferent constraint that enforces global arc consistency.static CPConstraintCPFactory.alternative(CPIntervalVar interval, CPIntervalVar[] alternatives) Returns an Alternative constraint: Enforces that if the interval variable interval is present, then one of the intervals from the array alternatives must be present and synchronized with a.static CPConstraintCPFactory.alternative(CPIntervalVar interval, CPIntervalVar[] alternatives, int cardinality) Returns an Alternative constraint: Enforces that if the interval variable interval is present, then cardinality intervals from the array alternatives must be present and synchronized with interval.static CPConstraintCPFactory.alternative(CPIntervalVar interval, CPIntervalVar[] alternatives, CPIntVar cardinality) Returns an Alternative constraint: Enforces that if the interval variable interval is present, then cardinality intervals from the array alternatives must be present and synchronized with a.static CPConstraintCPFactory.alwaysIn(CPCumulFunction fun, int minValue, int maxValue) Requires a cumulative function to always be within the range [minValue..maxValue] on the execution range of the cumulative function.static CPConstraintCPFactory.alwaysIn(CPCumulFunction fun, int minValue, int maxValue, int from, int to) Requires a cumulative function to always be within the range [minValue..maxValue] on the execution range [from..to).static CPConstraintCPFactory.alwaysIn(CPCumulFunction fun, int minValue, int maxValue, int from, int to, Constants.CumulativeAlgo algo) Requires a cumulative function to always be within the range [minValue..maxValue] on the execution range [from..to).static CPConstraintCPFactory.alwaysIn(CPCumulFunction fun, int minValue, int maxValue, Constants.CumulativeAlgo algo) Requires a cumulative function to always be within the range [minValue..maxValue] on the execution range of the cumulative function.static CPConstraintReturn a constraint that enforce that N is the number of indices i such that x[i] is in valsstatic CPConstraintCPFactory.atLeastNValue(CPIntVar[] x, CPIntVar nValue) Returns an atLeastNValue constraint using a forward checking algostatic CPConstraintReturns a circuit constraint (using the successor model)static CPConstraintCPFactory.endAt(CPIntervalVar var1, int end) Create a constraint that enforces that var1 ends at endstatic CPConstraintCPFactory.endAtEnd(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the end of var1 is equal to the end of var2static CPConstraintCPFactory.endAtEnd(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the end of var1 is equal to the end of var2 + delaystatic CPConstraintCPFactory.endAtStart(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the end of var1 is equal to the start of var2static CPConstraintCPFactory.endAtStart(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the end of var1 is equal to the start of var2 + delaystatic CPConstraintCPFactory.endBeforeEnd(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the end of var1 is lower or equal to the end of var2static CPConstraintCPFactory.endBeforeEnd(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the end of var1 is lower or equal to the end of var2 + delaystatic CPConstraintCPFactory.endBeforeStart(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the end of var1 is lower or equal to the start of var2static CPConstraintCPFactory.endBeforeStart(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the end of var1 is lower or equal to the start of var2 + delaystatic CPConstraintReturns a constraint imposing that the variable is equal to some given value.static CPConstraintReturns a constraint imposing that the two different variables must take the value.static CPConstraintReturns a constraint excluding a node from a sequencestatic CPConstraintReturns a constraint imposing that the value is excluded from the set variable.static CPConstraintReturns a constraint imposing that the variable is larger or equal to some given value.static CPConstraintReturns a constraint imposing that the a first variable is larger or equal to a second one.static CPConstraintReturns a constraint imposing that the variable is larger to some given value.static CPConstraintReturns a constraint imposing that the a first variable is larger to a second one.static CPConstraintModel the logical implication constraintstatic CPConstraintReturns a constraint imposing that the value is included in the set variable.static CPConstraintReturns a constraint inserting a node within a sequencestatic CPConstraintReturns the reified version of the constraintx <= y, i.e. the boolean variable that is set to true if and only ifx <= y.static CPConstraintReturns the reified version of the constraintx < y, i.e. the boolean variable that is set to true if and only ifx < y.static CPConstraintCPFactory.le(CPCumulFunction fun, int maxValue) Requires a cumulative function to always be equal or lesser than a value on the execution range [0..Constants.HORIZON).static CPConstraintCPFactory.le(CPCumulFunction fun, int maxValue, Constants.CumulativeAlgo algo) Requires a cumulative function to always be equal or lesser than a value on the execution range [0..Constants.HORIZON).static CPConstraintReturns a constraint imposing that the variable is less or equal to some given value.static CPConstraintReturns a constraint imposing that the first variable is less or equal to a second one.static CPConstraintReturns a constraint imposing that the variable is less to some given value.static CPConstraintReturns a constraint imposing that the first variable is less to a second one.static CPConstraintReturns a short table constraintstatic CPConstraintReturns a constraint imposing that the variable is different from some given value.static CPConstraintReturns a constraint imposing that the two different variables must take different values.static CPConstraintReturns a constraint imposing that the first variable differs from the second one minus a constant value.static CPConstraintCPFactory.notBetween(CPSeqVar seqVar, int prev, int node, int succ) Forbids a subsequence of length 3 to appear in aCPSeqVar, removing from the domain all sequences containing the sub-sequence given as input.static CPConstraintReturns an or constraint.static CPConstraintCPFactory.present(CPIntervalVar var1) Create a constraint that enforces an interval to be presentstatic CPConstraintReturns a constraint requiring a node within a sequencestatic CPConstraintCPFactory.shortTable(CPIntVar[] x, int[][] table, int star) Returns a short table constraintstatic CPConstraintCPFactory.startAfter(CPIntervalVar var1, int start) Create a constraint that enforces the start of var1 to be at or after startstatic CPConstraintCPFactory.startAt(CPIntervalVar var1, int start) Create a constraint that enforces the start of var1 to be equal to startstatic CPConstraintCPFactory.startAtEnd(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the start of var1 is equal to the end of var2static CPConstraintCPFactory.startAtEnd(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the start of var1 is equal to the end of var2 + delaystatic CPConstraintCPFactory.startAtStart(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the start of var1 is equal to the start of var2static CPConstraintCPFactory.startAtStart(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the start of var1 is equal to the start of var2 + delaystatic CPConstraintCPFactory.startBefore(CPIntervalVar var1, int start) Create a constraint that enforces the start of var1 to be before or at startstatic CPConstraintCPFactory.startBeforeEnd(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the start of var1 is lower or equal to the end of var2static CPConstraintCPFactory.startBeforeEnd(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the start of var1 is lower or equal to the end of var2 + delaystatic CPConstraintCPFactory.startBeforeStart(CPIntervalVar var1, CPIntervalVar var2) Creates a constraint that enforces that the start of var1 is lower or equal to the start of var2static CPConstraintCPFactory.startBeforeStart(CPIntervalVar var1, CPIntervalVar var2, int delay) Creates a constraint that enforces that the start of var1 is lower or equal to the start of var2 + delaystatic CPConstraintReturns a sum constraint.static CPConstraintReturns a sum constraint.static CPConstraintReturns a sum constraint.static CPConstraintReturns a table constraint -
Uses of CPConstraint in org.maxicp.cp.engine.constraints
Classes in org.maxicp.cp.engine.constraints that implement CPConstraintModifier and TypeClassDescriptionclassAbsolute value constraintclassArc Consistent AllDifferent Constraint Algorithm described in "A filtering algorithm for constraints of difference in CSPs" J-C.classclassAmong constraintclassDomain Consistency Filtering for AtLeastNValue constraint.classclassA Binary Knapsack constraint ensures that the total load is equal to the sum of the weights of the selected items.classTheBinPackingconstraint ensures that a set of items with given weights are packed into bins such that each bin's total weight respects a given capacity constraint.classclassclassHamiltonian Circuit Constraint with a successor modelclassArc Consistent AllDifferent Constraint with CostsclassImplementation of the Global Cardinality Constraint with Costs from the paperclassElement Constraint modelingarray[y] = zclassElement1DDC constraintclassclassElement Constraint modelingmatrix[x][y] = zclassclassInversePerm is a constraint that enforces that one permutation is the inverse of another.classReified equality constraintclassReified equality constraintclassReified less or equal constraint.classReified is less or equal constraintb <=> x <= y.classReified logical or constraintclassLess or equal constraint between two variablesclassclassMaximum ConstraintclassConstraint x * b = y where b is a boolean variableclassMultiplication Constraint x * c = z where c is a constantclassMultiplication Constraint x * y = cclassMultiplication Constraint x * y = z (all variables)classImplementation of Compact Table for Negative Table algorithm described inclassNot Equal constraint between two variablesclassLogical or constraintx1 or x2 or ... xnclassImplementation of Compact Table for Short Table algorithm described inclassSoft Global Cardinality ConstraintclassSorted constraint, x is sorted in y according to permutation oclassSquare Constraint x * x = yclassEnsures that only one Hamiltonian circuit appears in the provided successor variables.classSum ConstraintclassImplementation of Compact Table algorithm described in -
Uses of CPConstraint in org.maxicp.cp.engine.constraints.scheduling
Classes in org.maxicp.cp.engine.constraints.scheduling that implement CPConstraintModifier and TypeClassDescriptionclassAlternative Constraint with cardinality: Enforces that if the interval a is present, then c intervals from the array alt must be present and synchronized with a.classCumulative constraint with sum decomposition (very slow).classclassEnforces that interval A ends at interval B end if B is present and that interval B ends at interval A end if A is presentclassEnforces that interval A ends at interval B start if B is present and that interval B starts at interval A end if A is presentclassclassConstrains interval A to end before or at the end of interval B.classConstrains interval A to end before or at the start of interval B if both are present.classChecker for the generalized cumulative constraint.classGeneralized Cumulative Constraint using Timetabling TODO Refer paper once publishedclassGeneralized Cumulative Constraint using Timetabling TODO Refer paper once publishedclassclassclassTODOclassTODOclassTODOclassTODOclassTODOclassTODOclassclassclassReified is end before start constraintclassReified is end before start constraintclassclassReified is end before start constraintclassReified is start before start constraintclassNoOverlap constraint, ensures that a set of interval variables do not overlap in time.classBound Consistency filtering for the NoOverlap constraintclassclassclassclassEnforces that interval A starts at interval B end if B is present and that interval B ends at interval A start if A is presentclassEnforces that interval A starts at interval B start if B is present and that interval B starts at interval A start if A is presentclassclassConstrains interval A to start before or at the end of interval B if both are present.classConstrains interval A to start before or at the start of interval B. -
Uses of CPConstraint in org.maxicp.cp.engine.constraints.seqvar
Classes in org.maxicp.cp.engine.constraints.seqvar that implement CPConstraintModifier and TypeClassDescriptionclassclassclassclassExcludes a node from a sequenceclassInserts a node into a sequenceclassclassclassImposes that the sequence defined by the provided orderedSequence where the relaxed nodes have been removed is a subsequence of the provided sequence variable.classRequires a node in a sequence, forcing the node to be visitedclassLinks twoCPSeqVar, ensuring a subsequence appears within a super sequenceclassLinks aCPSeqVarwith time windows, enforcing that visits happen during valid timeframes. -
Uses of CPConstraint in org.maxicp.cp.engine.constraints.setvar
Classes in org.maxicp.cp.engine.constraints.setvar that implement CPConstraintModifier and TypeClassDescriptionclassConstraint that enforces a boolean variable to be true if a value is included in a set.classConstraint that enforces a boolean variable is true if one set is a subset of another set.classConstraint that enforces that the first set variable is not a subset of the second set variable.classConstraint that links the cardinality of a set variable to an integer variable.classConstraint that enforces that one set variable is a subset of another set variable. -
Uses of CPConstraint in org.maxicp.cp.engine.core
Classes in org.maxicp.cp.engine.core that implement CPConstraintModifier and TypeClassDescriptionclassAbstract class the most of the constraints should extend.classclassclassMethods in org.maxicp.cp.engine.core with parameters of type CPConstraintModifier and TypeMethodDescriptionCPBoolVarImpl.delta(CPConstraint c) CPIntVar.delta(CPConstraint c) Returns a delta object allowing to retrieve the changes in the domain of the variable (removed values) since the previous call to theConstraint.propagateof the constraint.CPIntVarConstant.delta(CPConstraint c) CPIntVarImpl.delta(CPConstraint c) CPIntVarViewMul.delta(CPConstraint c) CPIntVarViewOffset.delta(CPConstraint c) CPIntVarViewOpposite.delta(CPConstraint c) voidCPSolver.post(CPConstraint c) Posts the constraint, that is callpost()and computes the fix-point.voidCPSolver.post(CPConstraint c, boolean enforceFixPoint) Posts the constraint that is callpost()and optionally computes the fix-point.voidMaxiCP.post(CPConstraint c) voidMaxiCP.post(CPConstraint c, boolean enforceFixPoint) voidCPBoolVarImpl.propagateOnBoundChange(CPConstraint c) voidCPIntVar.propagateOnBoundChange(CPConstraint c) Asks thatpropagate()is called whenever the bound (maximum or minimum values) of the domain of this variable is changes.voidCPIntVarConstant.propagateOnBoundChange(CPConstraint c) voidCPIntVarImpl.propagateOnBoundChange(CPConstraint c) voidCPIntVarViewMul.propagateOnBoundChange(CPConstraint c) voidCPIntVarViewOffset.propagateOnBoundChange(CPConstraint c) voidCPIntVarViewOpposite.propagateOnBoundChange(CPConstraint c) voidCPIntervalVar.propagateOnChange(CPConstraint c) voidCPIntervalVarImpl.propagateOnChange(CPConstraint c) voidCPIntervalVarOffset.propagateOnChange(CPConstraint c) voidCPBoolVarImpl.propagateOnDomainChange(CPConstraint c) voidCPFixedSetVar.propagateOnDomainChange(CPConstraint c) voidCPIntVar.propagateOnDomainChange(CPConstraint c) Asks thatpropagate()is called whenever the domain of this variable changes.voidCPIntVarConstant.propagateOnDomainChange(CPConstraint c) voidCPIntVarImpl.propagateOnDomainChange(CPConstraint c) voidCPIntVarViewMul.propagateOnDomainChange(CPConstraint c) voidCPIntVarViewOffset.propagateOnDomainChange(CPConstraint c) voidCPIntVarViewOpposite.propagateOnDomainChange(CPConstraint c) voidCPSetVar.propagateOnDomainChange(CPConstraint c) Ask that thepropagate()method of the constraint c is called when the domain of the set variable changes (I,P or E).voidCPSetVarImpl.propagateOnDomainChange(CPConstraint c) voidCPNodeVar.propagateOnExclude(CPConstraint c) Asks thatpropagate()is called whenever the node is excluded.voidCPNodeVarViewFlip.propagateOnExclude(CPConstraint c) voidCPSeqVar.propagateOnExclude(CPConstraint c) Asks thatpropagate()is called whenever an exclusion happens.voidCPSeqVarImpl.propagateOnExclude(CPConstraint c) voidCPSeqVarViewFlip.propagateOnExclude(CPConstraint c) voidCPBoolVarImpl.propagateOnFix(CPConstraint c) voidCPIntVar.propagateOnFix(CPConstraint c) Asks thatpropagate()is called whenever the domain of this variable is reduced to a singleton.voidCPIntVarConstant.propagateOnFix(CPConstraint c) voidCPIntVarImpl.propagateOnFix(CPConstraint c) voidCPIntVarViewMul.propagateOnFix(CPConstraint c) voidCPIntVarViewOffset.propagateOnFix(CPConstraint c) voidCPIntVarViewOpposite.propagateOnFix(CPConstraint c) voidCPSeqVar.propagateOnFix(CPConstraint c) Asks thatpropagate()is called whenever the domain is fixedCPSeqVar.isFixed()In such a state the variable is fixed and we say that a fix event occurs.voidCPSeqVarImpl.propagateOnFix(CPConstraint c) voidCPSeqVarViewFlip.propagateOnFix(CPConstraint c) voidCPNodeVar.propagateOnInsert(CPConstraint c) Asks thatpropagate()is called whenever the node is inserted.voidCPNodeVarViewFlip.propagateOnInsert(CPConstraint c) voidCPSeqVar.propagateOnInsert(CPConstraint c) Asks thatpropagate()is called whenever an insertion happens.voidCPSeqVarImpl.propagateOnInsert(CPConstraint c) voidCPSeqVarViewFlip.propagateOnInsert(CPConstraint c) voidCPNodeVar.propagateOnInsertRemoved(CPConstraint c) Asks thatpropagate()is called whenever an insertion for the node is removed.voidCPNodeVarViewFlip.propagateOnInsertRemoved(CPConstraint c) voidCPSeqVar.propagateOnInsertRemoved(CPConstraint c) Asks thatpropagate()is called whenever an insertion is removed We say that a removeInsert event occurs.voidCPSeqVarImpl.propagateOnInsertRemoved(CPConstraint c) voidCPSeqVarViewFlip.propagateOnInsertRemoved(CPConstraint c) voidCPNodeVar.propagateOnRequire(CPConstraint c) Asks thatpropagate()is called whenever the node is required.voidCPNodeVarViewFlip.propagateOnRequire(CPConstraint c) voidCPSeqVar.propagateOnRequire(CPConstraint c) Asks thatpropagate()is called whenever a node is required.voidCPSeqVarImpl.propagateOnRequire(CPConstraint c) voidCPSeqVarViewFlip.propagateOnRequire(CPConstraint c) voidCPSolver.schedule(CPConstraint c) Schedules the constraint to be propagated by the fix-point.voidMaxiCP.schedule(CPConstraint c) Method parameters in org.maxicp.cp.engine.core with type arguments of type CPConstraintModifier and TypeMethodDescriptionprotected voidCPIntVarImpl.scheduleAll(StateStack<CPConstraint> constraints) protected voidCPSetVarImpl.scheduleAll(StateStack<CPConstraint> constraints)