5.383. sum
DESCRIPTION | LINKS | GRAPH |
- Origin
- Constraint
- Synonym
.
- Arguments
- Restrictions
- Purpose
is equal to the sum of the constants of corresponding to the set of the collection.
- Example
-
The constraint holds since its last argument is equal to the sum of the 2th and 3th items of the collection . As illustrated by FigureΒ 5.383.1, this stems from the fact that its first argument corresponds to the value of the attribute of the first item of the collection. Consequently the corresponding set is used for summing the 2th and 3th items of the collection.
Figure 5.383.1. Illustration of the correspondence between the arguments of the constraint in the context of the Example slot (from right to left, is equal to the sum of the constants 9 and 1 corresponding to the indices 2 and 3 of the set for which the attribute is equal to )
- Typical
- Symmetry
Items of are permutable.
- Arg. properties
Functional dependency: determined by , and .
- Usage
In his article introducing the constraint, TallysΒ H.Β Yunes mentions the Sequence Dependent Cumulative Cost Problem as the subproblem that originally motivates this constraint.
- Remark
The constraint is called in MiniZinc (http://www.minizinc.org/).
- Algorithm
The articleΒ [Yunes02] gives the convex hull relaxation of the constraint.
- Systems
- See also
common keyword: Β (data constraint), , Β (sum).
- Keywords
characteristic of a constraint: convex hull relaxation, sum.
constraint type: data constraint.
- Arc input(s)
- Arc generator
-
- Arc arity
- Arc constraint(s)
-
- Graph property(ies)
-
- Graph model
According to the value assigned to the arc constraint selects for the final graph:
The item of the collection,
The items of the collection for which the key correspond to the indices of the set of the collection.
Finally, since we use the graph property on the attribute of the collection, the last argument of the constraint is equal to the sum of the constants associated with the vertices of the final graph.
PartsΒ (A) andΒ (B) of FigureΒ 5.383.2 respectively show the initial and final graph associated with the Example slot. Since we use the graph property we show the vertices from which we compute in a box.
Figure 5.383.2. Initial and final graph of the constraint
(a) (b)