### 3.7.200. Relaxation dimension

A constraint that allows to model constraint relaxation in the context of placement problems. This is achieved by adding an extra dimension to the placement space where objects that are really considered are in the foreground, while objects that are discarded are rejected in the background. As a concrete example, consider a slight modification on the data of the task assignment and scheduling problem that is described at the keyword entry assigning and scheduling tasks that run in parallel. In this problem the four nurses were all not available during the time periods $\left[0,0\right]$, $\left[7,7\right]$, $\left[12,12\right]$ and $\left[22,22\right]$. We now rather consider the following unavailability periods $\left[0,0\right]$, $\left[8,8\right]$, $\left[12,12\right]$ and $\left[22,22\right]$. Under this new hypothesis we cannot anymore schedule all the five operations tasks ${t}_{1}$, ${t}_{2}$, ${t}_{3}$, ${t}_{4}$ and ${t}_{5}$, i.e., we get a no solution answer if we use the model described in assigning and scheduling tasks that run in parallel. In this model we are using a two -dimensional $\mathrm{𝚐𝚎𝚘𝚜𝚝}$ constraint, where the first and second dimensions respectively correspond to the time and resource axes. Now, in order to permit relaxation, we introduce a third dimension, a relaxation dimension. The idea is to map each task to a parallelepiped for which the size in the relaxation dimension is equal to one. In addition, the coordinate of a parallelepiped in the relaxation dimension is a variable taking its value in the interval $\left[1,n\right]$, where $n$ represents the number of operations to schedule (i.e., to each operation task ${t}_{i}$ $\left(1\le i\le n=5\right)$ we create a coordinate variable ${r}_{i}$ where $r$ stands for relaxation. Then, all parallelepipeds for which the coordinate in the relaxation dimension if set to 1 correspond to operations that are effectively scheduled, while all other parallelepipeds represent operations that are discarded. On the one hand, this model allows to directly express relaxation right from the beginning without introducing any extra soft constraint and without dynamically adding any constraint during search. On the other hand, one disadvantage is that the model does not directly consider an optimisation criteria like, for instance, the maximum number of tasks effectively scheduled, or the sum of the duration of the tasks effectively done; this can be modelled using extra constraints but this does not provide sharp bounds on the optimisation criteria. Nevertheless, this gives a compact model, specially in the context where additional constraints make more difficult the computation of a sharp bound. Going back to the example described at the keyword entry assigning and scheduling tasks that run in parallel, we get the following three -dimensional $\mathrm{𝚐𝚎𝚘𝚜𝚝}$ constraint.

$\mathrm{𝚐𝚎𝚘𝚜𝚝}$$\left(3,$

 $〈\mathrm{𝚘𝚒𝚍}-1$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{1},{a}_{1},{r}_{1}〉,$ $\mathrm{𝚘𝚒𝚍}-2$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{1},{s}_{1},{r}_{1}〉,$ $\mathrm{𝚘𝚒𝚍}-3$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{1},{n}_{11},{r}_{1}〉,$ $\mathrm{𝚘𝚒𝚍}-4$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{1},{n}_{12},{r}_{1}〉,$ $\mathrm{𝚘𝚒𝚍}-5$ $\mathrm{𝚜𝚒𝚍}-4$ $𝚡-〈{o}_{2},{a}_{2},{r}_{2}〉,$ $\mathrm{𝚘𝚒𝚍}-6$ $\mathrm{𝚜𝚒𝚍}-4$ $𝚡-〈{o}_{2},{s}_{2},{r}_{2}〉,$ $\mathrm{𝚘𝚒𝚍}-7$ $\mathrm{𝚜𝚒𝚍}-4$ $𝚡-〈{o}_{2},{n}_{2},{r}_{2}〉,$ $\mathrm{𝚘𝚒𝚍}-8$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚡-〈{o}_{3},{a}_{3},{r}_{3}〉,$ $\mathrm{𝚘𝚒𝚍}-9$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚡-〈{o}_{3},{s}_{31},{r}_{3}〉,$ $\mathrm{𝚘𝚒𝚍}-10$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚡-〈{o}_{3},{s}_{32},{r}_{3}〉,$ $\mathrm{𝚘𝚒𝚍}-11$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚡-〈{o}_{3},{n}_{31},{r}_{3}〉,$ $\mathrm{𝚘𝚒𝚍}-12$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚡-〈{o}_{3},{n}_{32},{r}_{3}〉,$ $\mathrm{𝚘𝚒𝚍}-13$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{4},{a}_{4},{r}_{4}〉,$ $\mathrm{𝚘𝚒𝚍}-14$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{4},{s}_{4},{r}_{4}〉,$ $\mathrm{𝚘𝚒𝚍}-15$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{4},{n}_{41},{r}_{4}〉,$ $\mathrm{𝚘𝚒𝚍}-16$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{4},{n}_{42},{r}_{4}〉,$ $\mathrm{𝚘𝚒𝚍}-17$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈{o}_{4},{n}_{43},{r}_{4}〉,$ $\mathrm{𝚘𝚒𝚍}-18$ $\mathrm{𝚜𝚒𝚍}-6$ $𝚡-〈{o}_{5},{a}_{5},{r}_{5}〉,$ $\mathrm{𝚘𝚒𝚍}-19$ $\mathrm{𝚜𝚒𝚍}-6$ $𝚡-〈{o}_{5},{s}_{5},{r}_{5}〉,$ $\mathrm{𝚘𝚒𝚍}-20$ $\mathrm{𝚜𝚒𝚍}-6$ $𝚡-〈{o}_{5},{n}_{5},{r}_{5}〉,$ $\mathrm{𝚘𝚒𝚍}-21$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈0,1,1〉,$ $\mathrm{𝚘𝚒𝚍}-22$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈5,1,1〉,$ $\mathrm{𝚘𝚒𝚍}-23$ $\mathrm{𝚜𝚒𝚍}-5$ $𝚡-〈12,1,1〉,$ $\mathrm{𝚘𝚒𝚍}-24$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚡-〈0,2,1〉,$ $\mathrm{𝚘𝚒𝚍}-25$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈6,2,1〉,$ $\mathrm{𝚘𝚒𝚍}-26$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈15,2,1〉,$ $\mathrm{𝚘𝚒𝚍}-27$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈22,2,1〉,$ $\mathrm{𝚘𝚒𝚍}-28$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈0,3,1〉,$ $\mathrm{𝚘𝚒𝚍}-29$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈8,3,1〉,$ $\mathrm{𝚘𝚒𝚍}-30$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈13,3,1〉,$ $\mathrm{𝚘𝚒𝚍}-31$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈5,4,1〉,$ $\mathrm{𝚘𝚒𝚍}-32$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚡-〈20,4,1〉,$ $\mathrm{𝚘𝚒𝚍}-33$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈0,5,1〉,$ $\mathrm{𝚘𝚒𝚍}-34$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈7,5,1〉,$ $\mathrm{𝚘𝚒𝚍}-35$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈12,5,1〉,$ $\mathrm{𝚘𝚒𝚍}-36$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈22,5,1〉,$ $\mathrm{𝚘𝚒𝚍}-37$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈0,6,1〉,$ $\mathrm{𝚘𝚒𝚍}-38$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈7,6,1〉,$ $\mathrm{𝚘𝚒𝚍}-39$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈12,6,1〉,$ $\mathrm{𝚘𝚒𝚍}-40$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈22,6,1〉,$ $\mathrm{𝚘𝚒𝚍}-41$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈0,7,1〉,$ $\mathrm{𝚘𝚒𝚍}-42$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈7,7,1〉,$ $\mathrm{𝚘𝚒𝚍}-43$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈12,7,1〉,$ $\mathrm{𝚘𝚒𝚍}-44$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈22,7,1〉,$ $\mathrm{𝚘𝚒𝚍}-45$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈0,8,1〉,$ $\mathrm{𝚘𝚒𝚍}-46$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈7,8,1〉,$ $\mathrm{𝚘𝚒𝚍}-47$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈12,8,1〉,$ $\mathrm{𝚘𝚒𝚍}-48$ $\mathrm{𝚜𝚒𝚍}-1$ $𝚡-〈22,8,1〉〉,$ $〈\mathrm{𝚜𝚒𝚍}-1$ $𝚝-〈0,0,0〉$ $𝚕-〈1,1,1〉,$ $\mathrm{𝚜𝚒𝚍}-2$ $𝚝-〈0,0,0〉$ $𝚕-〈2,1,1〉,$ $\mathrm{𝚜𝚒𝚍}-3$ $𝚝-〈0,0,0〉$ $𝚕-〈3,1,1〉,$ $\mathrm{𝚜𝚒𝚍}-4$ $𝚝-〈0,0,0〉$ $𝚕-〈4,1,1〉,$ $\mathrm{𝚜𝚒𝚍}-5$ $𝚝-〈0,0,0〉$ $𝚕-〈5,1,1〉,$ $\mathrm{𝚜𝚒𝚍}-6$ $𝚝-〈0,0,0〉$ $𝚕-〈6,1,1〉〉\right)$.

Figure 3.7.46 depicts a solution to the problem corresponding to the assignment ${o}_{1}=9$, ${r}_{1}=1$, ${a}_{1}=1$, ${s}_{1}=4$, ${n}_{11}=5$, ${n}_{12}=6$, ${o}_{2}=1$, ${r}_{2}=2$, ${a}_{2}=2$, ${s}_{2}=4$, ${n}_{2}=8$, ${o}_{3}=2$, ${r}_{3}=1$, ${a}_{3}=1$, ${s}_{31}=3$, ${s}_{32}=4$, ${n}_{31}=5$, ${n}_{32}=6$, ${o}_{4}=17$, ${r}_{4}=1$, ${a}_{4}=1$, ${s}_{4}=4$, ${n}_{41}=5$, ${n}_{42}=6$, ${n}_{43}=7$, ${o}_{5}=16$, ${r}_{5}=1$, ${a}_{5}=2$, ${s}_{5}=3$, ${n}_{5}=8$. During search, relaxation variables ${r}_{1}$, ${r}_{2}$, ${r}_{3}$, ${r}_{4}$, ${r}_{5}$ are first set to value one (i.e., the corresponding operations are scheduled) and then, upon backtracking, assigned to any value greater than one (i.e., their is no backtrack on the values that are greater than one since we just want to reject an operation in the background).