Package org.jacop.floats.constraints
Class SumFloat
- java.lang.Object
-
- All Implemented Interfaces:
SatisfiedPresent
,StoreAware
,UsesQueueVariable
public class SumFloat extends LinearFloat
SumFloat constraint implements the weighted summation over several Variable's . It provides the weighted sum from all Variable's on the list.This version works as argument to Reified and Xor constraints. For other constraints And, Or, Not, Eq, IfThen, IfThenElse it does not work currently.
- Version:
- 4.8
-
-
Field Summary
-
Fields inherited from class org.jacop.floats.constraints.linear.Linear
eq, ge, gt, le, list, lt, ne, relationType, sum, weights
-
Fields inherited from class org.jacop.constraints.PrimitiveConstraint
notConsistencyPruningEvents
-
Fields inherited from class org.jacop.constraints.Constraint
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace
-
Fields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static double[]
getFilledArray(int n)
-
Methods inherited from class org.jacop.floats.constraints.LinearFloat
derivative, queueVariable
-
Methods inherited from class org.jacop.floats.constraints.linear.Linear
consistency, getDefaultConsistencyPruningEvent, getDefaultNestedConsistencyPruningEvent, getDefaultNestedNotConsistencyPruningEvent, getDefaultNotConsistencyPruningEvent, impose, notConsistency, notSatisfied, rel2String, relation, satisfied, toString
-
Methods inherited from class org.jacop.constraints.PrimitiveConstraint
getNestedPruningEvent, getNotConsistencyPruningEvent, include, setNotConsistencyPruningEvent
-
Methods inherited from class org.jacop.constraints.Constraint
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, imposeDecomposition, increaseWeight, intArrayToString, numberArgs, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGrounded
-
Methods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, getDubletonsSkipSingletons, imposeDecomposition
-
-
-
-
Constructor Detail
-
SumFloat
@Deprecated public SumFloat(Store store, FloatVar[] list, java.lang.String rel, FloatVar sum)
Deprecated.SumFloat constraint does not use Store parameter any longer.- Parameters:
store
- current storelist
- variables which are being multiplied by weights.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- variable containing the sum of weighted variables.
-
-