5.1. abs_value

DESCRIPTIONLINKS
Origin

Arithmetic.

Constraint

πšŠπš‹πšœ_πšŸπšŠπš•πšžπšŽ(𝚈,πš‡)

Usual name

πšŠπš‹πšœ

Synonym

πšŠπš‹πšœπš˜πš•πšžπšπšŽ_πšŸπšŠπš•πšžπšŽ.

Arguments
πšˆπšπšŸπšŠπš›
πš‡πšπšŸπšŠπš›
Restriction
𝚈β‰₯0
Purpose

Enforce the fact that the first variable is equal to the absolute value of the second variable.

Example
(8,-8)

The πšŠπš‹πšœ_πšŸπšŠπš•πšžπšŽ constraint holds since 8 is equal to |-8|.

All solutions

FigureΒ 5.1.1 gives all solutions to the following non ground instance of the πšŠπš‹πšœ_πšŸπšŠπš•πšžπšŽ constraint: 𝚈∈[1,6], πš‡βˆˆ[-2,3], πšŠπš‹πšœ_πšŸπšŠπš•πšžπšŽ(𝚈,πš‡).

Figure 5.1.1. All solutions corresponding to the non ground example of the πšŠπš‹πšœ_πšŸπšŠπš•πšžπšŽ constraint of the All solutions slot
ctrs/abs_value-1-tikz
Arg. properties

Functional dependency: 𝚈 determined by πš‡.

Systems

abs in Choco, abs in Gecode.

See also

implied by: 𝚎𝚚.

implies: 𝚐𝚎𝚚, πš£πšŽπš›πš˜_πš˜πš›_πš—πš˜πš_πš£πšŽπš›πš˜.

implies (if swap arguments): πš˜πš™πš™πš˜πšœπš’πšπšŽ_πšœπš’πšπš—, πš£πšŽπš›πš˜_πš˜πš›_πš—πš˜πš_πš£πšŽπš›πš˜.

Keywords

constraint arguments: binary constraint, pure functional dependency.

constraint type: predefined constraint, arithmetic constraint.

filtering: arc-consistency.

modelling: functional dependency.