5.288. set_value_precede

DESCRIPTIONLINKS
Origin

[YatChiuLawJimmyLee04]

Constraint

𝚜𝚎𝚝_πšŸπšŠπš•πšžπšŽ_πš™πš›πšŽπšŒπšŽπšπšŽ(πš‚,πšƒ,πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚)

Arguments
πš‚πš’πš—πš
πšƒπš’πš—πš
πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚πšŒπš˜πš•πš•πšŽπšŒπšπš’πš˜πš—(πšŸπšŠπš›-πšœπšŸπšŠπš›)
Restrictions
πš‚β‰ πšƒ
πš›πšŽπššπšžπš’πš›πšŽπš(πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚,πšŸπšŠπš›)
Purpose

If there exists a set variable v 1 of πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚ such that πš‚ does not belong to v 1 and πšƒ does, then there also exists a set variable v 2 preceding v 1 such that πš‚ belongs to v 2 and πšƒ does not.

Example
2,1,πšŸπšŠπš›-{0,2},πšŸπšŠπš›-{0,1},πšŸπšŠπš›-βˆ…,πšŸπšŠπš›-{1}

The 𝚜𝚎𝚝_πšŸπšŠπš•πšžπšŽ_πš™πš›πšŽπšŒπšŽπšπšŽ constraint holds since the first occurrence of value 2 precedes the first occurrence of value 1.

Algorithm

A filtering algorithm for maintaining value precedence on a sequence of set variables is presented inΒ [YatChiuLawJimmyLee04]. Its complexity is linear to the number of variables of the collection πš…π™°πšπ™Έπ™°π™±π™»π™΄πš‚.

See also

specialisation: πš’πš—πš_πšŸπšŠπš•πšžπšŽ_πš™πš›πšŽπšŒπšŽπšπšŽΒ (πšœπšŽπššπšžπšŽπš—πšŒπšŽ of 𝚜𝚎𝚝 πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ replaced by πšœπšŽπššπšžπšŽπš—πšŒπšŽ of πšπš˜πš–πšŠπš’πš— πšŸπšŠπš›πš’πšŠπš‹πš•πšŽπšœ).

Keywords

constraint arguments: constraint involving set variables.

constraint type: order constraint.

symmetry: symmetry, indistinguishable values, value precedence.