### 3.7.27. Balanced assignment

• $\mathrm{𝚍𝚎𝚟𝚒𝚊𝚝𝚒𝚘𝚗}$,

• $\mathrm{𝚜𝚙𝚛𝚎𝚊𝚍}$.

A constraint to obtain a balanced assignment over a set of domain variables. Given a set of domain variables $\left\{{x}_{1},{x}_{2},\cdots ,{x}_{n}\right\}$, some classical balance criteria reported in

• The maximum value, i.e., the maximum value over ${x}_{i}$ $\left(i\in \left[1,n\right]\right)$ can be modelled with a $\mathrm{𝚖𝚊𝚡𝚒𝚖𝚞𝚖}$ constraint.

• The maximum deviation, i.e., the maximum value over ${x}_{i}-\frac{{\sum }_{j\in \left[1,n\right]}{x}_{j}}{n}$ $\left(i\in \left[1,n\right]\right)$.

• The total deviation, i.e., ${\sum }_{i\in \left[1,n\right]}\left|{x}_{i}-\frac{{\sum }_{j\in \left[1,n\right]}{x}_{j}}{n}\right|$ can be modelled with a $\mathrm{𝚍𝚎𝚟𝚒𝚊𝚝𝚒𝚘𝚗}$ constraint

• The total quadratic deviation, i.e, ${\sum }_{i\in \left[1,n\right]}{\left({x}_{i}-\frac{{\sum }_{j\in \left[1,n\right]}{x}_{j}}{n}\right)}^{2}$ can be modelled with a $\mathrm{𝚜𝚙𝚛𝚎𝚊𝚍}$ constraint