5.252. opposite_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 less than or equal to 0.

Example
(6,-3)

The 𝚘𝚙𝚙𝚘𝚜𝚒𝚝𝚎_𝚜𝚒𝚐𝚗 constraint holds since 6 and -3 do not have the same sign.

Symmetry

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

See also

comparison swapped: 𝚜𝚊𝚖𝚎_𝚜𝚒𝚐𝚗.

Keywords

constraint arguments: binary constraint.

constraint type: predefined constraint, arithmetic constraint.

filtering: arc-consistency.