Package org.jacop.constraints
Class Sum
- java.lang.Object
-
- org.jacop.constraints.DecomposedConstraint<Constraint>
-
- org.jacop.constraints.Constraint
-
- org.jacop.constraints.Sum
-
- All Implemented Interfaces:
SatisfiedPresent
@Deprecated public class Sum extends Constraint implements SatisfiedPresent
Deprecated.As of release 4.3.1 replaced by SumInt constraint.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intguideValueDeprecated.(package private) static java.util.concurrent.atomic.AtomicIntegeridNumberDeprecated.IntVar[]listDeprecated.It specifies the variables to be summed.private TimeStamp<java.lang.Integer>nextGroundedPositionDeprecated.The position for the next grounded variable.IntVarsumDeprecated.It specifies variable sum to store the overall sum of the variables being summed up.private TimeStamp<java.lang.Integer>sumGroundedDeprecated.The sum of grounded variables.-
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
Constructors Constructor Description Sum(java.util.List<? extends IntVar> list, IntVar sum)Deprecated.It creates a sum constraints which sums all variables and makes it equal to variable sum.Sum(IntVar[] list, IntVar sum)Deprecated.It constructs sum constraint which sums all variables and makes it equal to variable sum.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) voidcheckForOverflow()Deprecated.voidconsistency(Store store)Deprecated.It is a (most probably incomplete) consistency function which removes the values from variables domains.intgetDefaultConsistencyPruningEvent()Deprecated.ConstraintgetGuideConstraint()Deprecated.It specifies a constraint which if imposed by search will enhance propagation of this constraint.intgetGuideValue()Deprecated.This function provides a value which if assigned to a variable returned by getGuideVariable() will enhance propagation of this constraint.VargetGuideVariable()Deprecated.This function provides a variable which assigned a value returned by will enhance propagation of this constraint.voidimpose(Store store)Deprecated.It imposes the constraint in a given store.booleansatisfied()Deprecated.It checks if the constraint is satisfied.voidsupplyGuideFeedback(boolean feedback)Deprecated.This function allows to provide a guide feedback.java.lang.StringtoString()Deprecated.It produces a string representation of a constraint state.-
Methods inherited from class org.jacop.constraints.Constraint
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, grounded, grounded, id, impose, imposeDecomposition, increaseWeight, intArrayToString, long2int, numberArgs, queueVariable, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, toInt, toInt, updateAFC, watchedVariableGrounded
-
Methods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
-
-
-
Field Detail
-
idNumber
static java.util.concurrent.atomic.AtomicInteger idNumber
Deprecated.
-
list
public IntVar[] list
Deprecated.It specifies the variables to be summed.
-
sum
public IntVar sum
Deprecated.It specifies variable sum to store the overall sum of the variables being summed up.
-
sumGrounded
private TimeStamp<java.lang.Integer> sumGrounded
Deprecated.The sum of grounded variables.
-
nextGroundedPosition
private TimeStamp<java.lang.Integer> nextGroundedPosition
Deprecated.The position for the next grounded variable.
-
guideValue
int guideValue
Deprecated.
-
-
Method Detail
-
consistency
public void consistency(Store store)
Deprecated.Description copied from class:ConstraintIt 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:
consistencyin classConstraint- Parameters:
store- constraint store within which the constraint consistency is being checked.
-
getDefaultConsistencyPruningEvent
public int getDefaultConsistencyPruningEvent()
Deprecated.- Specified by:
getDefaultConsistencyPruningEventin classConstraint
-
impose
public void impose(Store store)
Deprecated.Description copied from class:ConstraintIt imposes the constraint in a given store.- Overrides:
imposein classConstraint- Parameters:
store- the constraint store to which the constraint is imposed to.
-
satisfied
public boolean satisfied()
Deprecated.Description copied from interface:SatisfiedPresentIt checks if the constraint is satisfied. It can return false even if constraint is satisfied but not all variables in its scope are grounded. It needs to return true if all variables in its scope are grounded and constraint is satisfied.Implementations of this interface for constraints that are not PrimitiveConstraint may require constraint imposition and consistency check as a requirement to work correctly.
- Specified by:
satisfiedin interfaceSatisfiedPresent- Returns:
- true if constraint is possible to verify that it is satisfied.
-
checkForOverflow
void checkForOverflow()
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.Description copied from class:ConstraintIt produces a string representation of a constraint state.- Overrides:
toStringin classConstraint
-
getGuideConstraint
public Constraint getGuideConstraint()
Deprecated.Description copied from class:ConstraintIt specifies a constraint which if imposed by search will enhance propagation of this constraint.- Overrides:
getGuideConstraintin classConstraint- Returns:
- Constraint enhancing propagation of this constraint.
-
getGuideValue
public int getGuideValue()
Deprecated.Description copied from class:ConstraintThis function provides a value which if assigned to a variable returned by getGuideVariable() will enhance propagation of this constraint.- Overrides:
getGuideValuein classConstraint- Returns:
- Value which is a base of enhancing constraint.
-
getGuideVariable
public Var getGuideVariable()
Deprecated.Description copied from class:ConstraintThis function provides a variable which assigned a value returned by will enhance propagation of this constraint.- Overrides:
getGuideVariablein classConstraint- Returns:
- Variable which is a base of enhancing constraint.
-
supplyGuideFeedback
public void supplyGuideFeedback(boolean feedback)
Deprecated.Description copied from class:ConstraintThis function allows to provide a guide feedback. If constraint does not propose sufficiently good enhancing constraints it will be informed so it has a chance to reexamine its efforts.- Overrides:
supplyGuideFeedbackin classConstraint- Parameters:
feedback- true if the guide was useful, false otherwise.
-
-