Package org.jacop.floats.constraints
Class SumFloat
- All Implemented Interfaces:
SatisfiedPresent
,StoreAware
,UsesQueueVariable
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
-
Constructor Summary
Constructors -
Method Summary
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 Details
-
SumFloat
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.
-
SumFloat
- Parameters:
list
- variables which are being multiplied by weights.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- variable containing the sum of weighted variables.
-
-
Method Details
-
getFilledArray
private static double[] getFilledArray(int n)
-