Package org.jacop.constraints
Class Increasing
java.lang.Object
org.jacop.constraints.DecomposedConstraint<Constraint>
org.jacop.constraints.Constraint
org.jacop.constraints.Increasing
- Direct Known Subclasses:
Decreasing
Increasing constraint assures that all variables are in increasing order.
- Version:
- 4.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
<Constraint> (package private) static AtomicInteger
(package private) int
(package private) byte
(package private) IntVar[]
Fields inherited from class org.jacop.constraints.Constraint
afcWeight, atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace, watchedVariableGrounded
Fields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex
-
Constructor Summary
ConstructorsConstructorDescriptionIncreasing
(List<IntVar> x) It constructs an increasing constraint.Increasing
(List<IntVar> x, boolean strict) Increasing
(IntVar[] x) Increasing
(IntVar[] x, boolean strict) -
Method Summary
Modifier and TypeMethodDescriptionvoid
consistency
(Store store) It is a (most probably incomplete) consistency function which removes the values from variables domains.It returns an array list of constraint which are used to decompose this constraint.int
void
imposeDecomposition
(Store store) It imposes the decomposition of the given constraint in a given store.toString()
It produces a string representation of a constraint state.Methods inherited from class org.jacop.constraints.Constraint
afc, arguments, cleanAfterFailure, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, impose, increaseWeight, intArrayToString, long2int, numberArgs, queueVariable, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, toInt, toInt, updateAFC, watchedVariableGrounded
Methods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
Field Details
-
idNumber
-
x
IntVar[] x -
n
int n -
strict
byte strict -
constraints
-
-
Constructor Details
-
Increasing
-
Increasing
-
Increasing
It constructs an increasing constraint.- Parameters:
x
- variables which must be in increasing order.
-
Increasing
-
-
Method Details
-
consistency
Description copied from class:Constraint
It is a (most probably incomplete) consistency function which removes the values from variables domains. Only values which do not have any support in a solution space are removed.- Specified by:
consistency
in classConstraint
- Parameters:
store
- constraint store within which the constraint consistency is being checked.
-
decompose
Description copied from class:Constraint
It returns an array list of constraint which are used to decompose this constraint. It actually creates a decomposition (possibly also creating variables), but it does not impose the constraint.- Overrides:
decompose
in classConstraint
- Parameters:
store
- the constraint store in which context the decomposition takes place.- Returns:
- an array list of constraints used to decompose this constraint.
-
imposeDecomposition
Description copied from class:Constraint
It imposes the decomposition of the given constraint in a given store.- Overrides:
imposeDecomposition
in classConstraint
- Parameters:
store
- the constraint store to which the constraint is imposed to.
-
getDefaultConsistencyPruningEvent
public int getDefaultConsistencyPruningEvent()- Specified by:
getDefaultConsistencyPruningEvent
in classConstraint
-
toString
Description copied from class:Constraint
It produces a string representation of a constraint state.- Overrides:
toString
in classConstraint
-