5.341. same_sign

DESCRIPTIONLINKS
Origin

Arithmetic.

Constraint

𝚜𝚊𝚖𝚎_𝚜𝚒𝚐𝚗(𝚅𝙰𝚁1,𝚅𝙰𝚁2)

Arguments
𝚅𝙰𝚁1𝚍𝚟𝚊𝚛
𝚅𝙰𝚁2𝚍𝚟𝚊𝚛
Restriction
Purpose

Enforce the fact that the product of the first and second variables is greater than or equal to 0.

Example
(7,1)

The 𝚜𝚊𝚖𝚎_𝚜𝚒𝚐𝚗 constraint holds since 7 and 1 have the same sign.

Typical
𝚅𝙰𝚁10
𝚅𝙰𝚁20
Symmetry

Arguments are permutable w.r.t. permutation (𝚅𝙰𝚁1,𝚅𝙰𝚁2).

See also

comparison swapped: 𝚘𝚙𝚙𝚘𝚜𝚒𝚝𝚎_𝚜𝚒𝚐𝚗.

implied by: 𝚍𝚒𝚟𝚒𝚜𝚒𝚋𝚕𝚎_𝚘𝚛, 𝚎𝚚, 𝚜𝚒𝚐𝚗_𝚘𝚏.

Keywords

constraint arguments: binary constraint.

constraint type: predefined constraint, arithmetic constraint.

filtering: arc-consistency.