5.121. element_product

DESCRIPTIONLINKSGRAPH
Origin

[OttossonThorsteinsson00]

Constraint

πšŽπš•πšŽπš–πšŽπš—πš_πš™πš›πš˜πšπšžπšŒπš(𝚈,πšƒπ™°π™±π™»π™΄,πš‡,πš‰)

Synonym

πšŽπš•πšŽπš–πšŽπš—πš.

Arguments
πšˆπšπšŸπšŠπš›
πšƒπ™°π™±π™»π™΄πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš•πšžπšŽ-πš’πš—πš)
πš‡πšπšŸπšŠπš›
πš‰πšπšŸπšŠπš›
Restrictions
𝚈β‰₯1
πšˆβ‰€|πšƒπ™°π™±π™»π™΄|
πš‡β‰₯0
πš‰β‰₯0
πš›πšŽπššπšžπš’πš›πšŽπš(πšƒπ™°π™±π™»π™΄,πšŸπšŠπš•πšžπšŽ)
πšƒπ™°π™±π™»π™΄.πšŸπšŠπš•πšžπšŽβ‰₯0
Purpose

πš‰ is equal to the 𝚈 th item of πšƒπ™°π™±π™»π™΄ multiplied by πš‡.

Example
(3,6,9,2,9,5,10)

The πšŽπš•πšŽπš–πšŽπš—πš_πš™πš›πš˜πšπšžπšŒπš constraint holds since its fourth argument πš‰=10 is equal to the 3th (𝚈=3) item of the collection 〈6,9,2,9βŒͺ multiplied by πš‡=5.

Typical
πš‡>0
πš‰>0
|πšƒπ™°π™±π™»π™΄|>1
πš›πšŠπš—πšπšŽ(πšƒπ™°π™±π™»π™΄.πšŸπšŠπš•πšžπšŽ)>1
πšƒπ™°π™±π™»π™΄.πšŸπšŠπš•πšžπšŽ>0
Usage

The πšŽπš•πšŽπš–πšŽπš—πš_πš™πš›πš˜πšπšžπšŒπš constraint was originally used in configuration problemsΒ [OttossonThorsteinsson00]. In this context, πš‰ denotes the cost of buying πš‡ units of type 𝚈 at cost πšƒπ™°π™±π™»π™΄[𝚈].πšŸπšŠπš•πšžπšŽ.

Reformulation

By introducing an extra variable πš…π™°π™», the πšŽπš•πšŽπš–πšŽπš—πš_πš™πš›πš˜πšπšžπšŒπš(𝚈,πšƒπ™°π™±π™»π™΄,πš‡,πš‰) constraint can be expressed in term of an πšŽπš•πšŽπš–πšŽπš—πš(𝚈,πšƒπ™°π™±π™»π™΄,πš…π™°π™») constraint and of a product constraint πš‰=πš…π™°π™»Β·πš‡.

See also

common keyword: πšŽπš•πšŽπš–, πšŽπš•πšŽπš–πšŽπš—πš, πšŽπš•πšŽπš–πšŽπš—πš_πšπš›πšŽπšŠπšπšŽπš›πšŽπšš, πšŽπš•πšŽπš–πšŽπš—πš_πš•πšŽπšœπšœπšŽπššΒ (array constraint).

Keywords

application area: configuration problem.

constraint type: data constraint.

modelling: array constraint, table, functional dependency, variable subscript.

Derived Collection
πšŒπš˜πš•π™Έπšƒπ™΄π™Ό-πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(𝚒-πšπšŸπšŠπš›,𝚑-πšπšŸπšŠπš›,𝚣-πšπšŸπšŠπš›),πš’πšπšŽπš–(𝚒-𝚈,𝚑-πš‡,𝚣-πš‰)]
Arc input(s)

π™Έπšƒπ™΄π™Ό πšƒπ™°π™±π™»π™΄

Arc generator
π‘ƒπ‘…π‘‚π·π‘ˆπΆπ‘‡β†¦πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πš’πšπšŽπš–,πšπšŠπš‹πš•πšŽ)

Arc arity
Arc constraint(s)
β€’ πš’πšπšŽπš–.𝚒=πšπšŠπš‹πš•πšŽ.πš”πšŽπš’
β€’ πš’πšπšŽπš–.𝚣=πš’πšπšŽπš–.𝚑*πšπšŠπš‹πš•πšŽ.πšŸπšŠπš•πšžπšŽ
Graph property(ies)
𝐍𝐀𝐑𝐂=1

Graph model

We use the derived collection π™Έπšƒπ™΄π™Ό for putting together the 𝚈, the πš‡ and πš‰ parameters of the πšŽπš•πšŽπš–πšŽπš—πš_πš™πš›πš˜πšπšžπšŒπš constraint. Within the arc constraint we use the implicit attribute πš”πšŽπš’ that associates to each item of a collection its position within the collection.

PartsΒ (A) andΒ (B) of FigureΒ 5.121.1 respectively show the initial and final graph associated with the Example slot. Since we use the 𝐍𝐀𝐑𝐂 graph property, the unique arc of the final graph is stressed in bold.

Figure 5.121.1. Initial and final graph of the πšŽπš•πšŽπš–πšŽπš—πš_πš™πš›πš˜πšπšžπšŒπš constraint
ctrs/element_productActrs/element_productB
(a) (b)
Signature

Because of the first condition of the arc constraint the final graph cannot have more than one arc. Therefore we can rewrite 𝐍𝐀𝐑𝐂=1 to 𝐍𝐀𝐑𝐂β‰₯1 and simplify 𝐍𝐀𝐑𝐂 Β― Μ² to 𝐍𝐀𝐑𝐂 Β―.