Package org.jacop.constraints
Class SoftAlldifferent
This class provides soft-alldifferent constraint by decomposing it
either into a network flow constraint or a set of primitive constraints.
- Version:
- 4.8
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex
-
Constructor Summary
ConstructorsConstructorDescriptionSoftAlldifferent
(IntVar[] xVars, IntVar costVar, ViolationMeasure violationMeasure) -
Method Summary
Modifier and TypeMethodDescriptionIt returns an array list of constraint which are used to decompose this constraint.void
imposeDecomposition
(Store store) It imposes the constraint in a given store.primitiveDecomposition
(Store store) toString()
Methods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
Field Details
-
decomposition
-
xVars
-
costVar
-
violationMeasure
-
-
Constructor Details
-
SoftAlldifferent
-
-
Method Details
-
primitiveDecomposition
-
decompose
Description copied from class:DecomposedConstraint
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.- Specified by:
decompose
in classDecomposedConstraint<Constraint>
- 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:DecomposedConstraint
It imposes the constraint in a given store.- Specified by:
imposeDecomposition
in classDecomposedConstraint<Constraint>
- Parameters:
store
- the constraint store to which the constraint is imposed to.
-
toString
-