5.384. sum_ctr
DESCRIPTION | LINKS | GRAPH |
- Origin
Arithmetic constraint.
- Constraint
- Synonyms
, , , .
- Arguments
- Restrictions
- Purpose
Constraint the sum of a set of domain variables. More precisely, let denote the sum of the variables of the collection (when the collection is empty the corresponding sum is equal to 0). Enforce the following constraint to hold: .
- Example
-
The constraint holds since the condition is satisfied.
- Typical
- Symmetry
Items of are permutable.
- Arg. properties
Contractible wrt. when and .
Contractible wrt. when and .
Extensible wrt. when and .
Extensible wrt. when and .
Aggregate: , , .
- Remark
When corresponds to this constraint is referenced under the names in KOALOG (http://www.koalog.com/php/index.php) and in JaCoP (http://www.jacop.eu/).
- Systems
equation in Choco, linear in Gecode, scalar_product in SICStus.
- Used in
- See also
assignment dimension added: Β (assignment dimension corresponding to intervals is added).
common keyword: Β (arithmetic constraint), Β (sum), , Β (arithmetic constraint), , , , , Β (sum), Β (arithmetic constraint), Β (sum).
generalisation: Β (arithmetic constraint where all coefficients are not necessarly equal to 1).
- Keywords
characteristic of a constraint: sum.
constraint type: arithmetic constraint.
heuristics: regret based heuristics, regret based heuristics in matrix problems.
- Cond. implications
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
- Graph property(ies)
-
- Graph model
Since we want to keep all the vertices of the initial graph we use the arc generator together with the arc constraint. This predefined arc constraint always holds.
PartsΒ (A) andΒ (B) of FigureΒ 5.384.1 respectively show the initial and final graph associated with the Example slot. Since we use the arc constraint both graphs are identical.
Figure 5.384.1. Initial and final graph of the constraint
(a) (b)