## 5.63. change_pair

Origin
Constraint

$\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi }\left(\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄},\mathrm{\pi Ώ\pi °\pi Έ\pi \pi },\mathrm{\pi ²\pi \pi \pi },\mathrm{\pi ²\pi \pi \pi }\right)$

Arguments
 $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi ‘}-\mathrm{\pi \pi \pi \pi },\mathrm{\pi ’}-\mathrm{\pi \pi \pi \pi }\right)$ $\mathrm{\pi ²\pi \pi \pi }$ $\mathrm{\pi \pi \pi \pi }$ $\mathrm{\pi ²\pi \pi \pi }$ $\mathrm{\pi \pi \pi \pi }$
Restrictions
 $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}\beta ₯0$ $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}<|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|$ $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ώ\pi °\pi Έ\pi \pi },\left[\mathrm{\pi ‘},\mathrm{\pi ’}\right]\right)$
Purpose

$\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ is the number of times that the following disjunction holds: $\left({X}_{1}\mathrm{\pi ²\pi \pi \pi }{X}_{2}\right)\beta ¨\left({Y}_{1}\mathrm{\pi ²\pi \pi \pi }{Y}_{2}\right)$, where $\left({X}_{1},{Y}_{1}\right)$ and $\left({X}_{2},{Y}_{2}\right)$ correspond to consecutive pairs of variables of the collection $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$.

Example

In the example we have the following 3 changes:

• One change between pairs $\mathrm{\pi ‘}-3$ $\mathrm{\pi ’}-8$ and $\mathrm{\pi ‘}-3$ $\mathrm{\pi ’}-4$ since ,

• One change between pairs $\mathrm{\pi ‘}-3$ $\mathrm{\pi ’}-7$ and $\mathrm{\pi ‘}-1$ $\mathrm{\pi ’}-3$ since ,

• One change between pairs $\mathrm{\pi ‘}-1$ $\mathrm{\pi ’}-6$ and $\mathrm{\pi ‘}-3$ $\mathrm{\pi ’}-7$ since .

Consequently the $\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi }$ constraint holds since its first argument $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ is assigned value 3.

Typical
 $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}>0$ $|\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }|>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }.\mathrm{\pi ‘}\right)>1$ $\mathrm{\pi \pi \pi \pi \pi }$$\left(\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }.\mathrm{\pi ’}\right)>1$
Symmetries
• One and the same constant can be added to the $\mathrm{\pi ‘}$ attribute of all items of $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$.

• One and the same constant can be added to the $\mathrm{\pi ’}$ attribute of all items of $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$.

Arg. properties

Functional dependency: $\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$ determined by $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$, $\mathrm{\pi ²\pi \pi \pi }$ and $\mathrm{\pi ²\pi \pi \pi }$.

Usage

Here is a typical example where this constraint is useful. Assume we have to produce a set of cables. A given quality and a given cross-section that respectively correspond to the $\mathrm{\pi ‘}$ and $\mathrm{\pi ’}$ attributes of the previous pairs of variables characterise each cable. The problem is to sequence the different cables in order to minimise the number of times two consecutive wire cables ${C}_{1}$ and ${C}_{2}$ verify the following property: ${C}_{1}$ and ${C}_{2}$ do not have the same quality or the cross section of ${C}_{1}$ is greater than the cross section of ${C}_{2}$.

generalisation: $\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi }$).

specialisation: $\mathrm{\pi \pi \pi \pi \pi \pi }$Β ($\mathrm{\pi \pi \pi \pi }$ of $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi }$ replaced by $\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi }$).

Keywords
Arc input(s)

$\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$

Arc generator
$\mathrm{\pi \pi ΄\pi \pi »}$$\beta ¦\mathrm{\pi \pi \pi \pi \pi \pi \pi \pi \pi \pi }\left(\mathrm{\pi \pi \pi \pi \pi }\mathtt{1},\mathrm{\pi \pi \pi \pi \pi }\mathtt{2}\right)$

Arc arity
Arc constraint(s)
$\mathrm{\pi \pi \pi \pi \pi }\mathtt{1}.\mathrm{\pi ‘}\mathrm{\pi ²\pi \pi \pi }\mathrm{\pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi ‘}\beta ¨\mathrm{\pi \pi \pi \pi \pi }\mathtt{1}.\mathrm{\pi ’}\mathrm{\pi ²\pi \pi \pi }\mathrm{\pi \pi \pi \pi \pi }\mathtt{2}.\mathrm{\pi ’}$
Graph property(ies)
$\mathrm{\pi \pi \pi \pi }$$=\mathrm{\pi ½\pi ²\pi ·\pi °\pi ½\pi Ά\pi ΄}$

Graph class
 $\beta ’$$\mathrm{\pi °\pi ²\pi \pi ²\pi »\pi Έ\pi ²}$ $\beta ’$$\mathrm{\pi ±\pi Έ\pi Ώ\pi °\pi \pi \pi Έ\pi \pi ΄}$ $\beta ’$$\mathrm{\pi ½\pi Ύ}_\mathrm{\pi »\pi Ύ\pi Ύ\pi Ώ}$

Graph model

Same as $\mathrm{\pi \pi \pi \pi \pi \pi }$, except that each item has two attributes $\mathrm{\pi ‘}$ and $\mathrm{\pi ’}$.

PartsΒ (A) andΒ (B) of FigureΒ 5.63.1 respectively show the initial and final graph associated with the Example slot. Since we use the $\mathrm{\pi \pi \pi \pi }$ graph property, the arcs of the final graph are stressed in bold.

Automaton

FigureΒ 5.63.2 depicts the automaton associated with the $\mathrm{\pi \pi \pi \pi \pi \pi }_\mathrm{\pi \pi \pi \pi }$ constraint. To each pair of consecutive pairs $\left(\left({\mathrm{\pi }}_{i},{\mathrm{\pi }}_{i}\right),\left({\mathrm{\pi }}_{i+1},{\mathrm{\pi }}_{i+1}\right)\right)$ of the collection $\mathrm{\pi Ώ\pi °\pi Έ\pi \pi }$ corresponds a 0-1 signature variable ${S}_{i}$. The following signature constraint links ${\mathrm{\pi }}_{i}$, ${\mathrm{\pi }}_{i}$, ${\mathrm{\pi }}_{i+1}$, ${\mathrm{\pi }}_{i+1}$ and ${S}_{i}$: $\left({\mathrm{\pi }}_{i}\mathrm{\pi ²\pi \pi \pi }{\mathrm{\pi }}_{i+1}\right)\beta ¨\left({\mathrm{\pi }}_{i}\mathrm{\pi ²\pi \pi \pi }{\mathrm{\pi }}_{i+1}\right)\beta {S}_{i}$.