### 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{\pi \pi \pi \pi \pi }$ 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\beta €i\beta €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{\pi \pi \pi \pi \pi }$ constraint.

$\mathrm{\pi \pi \pi \pi \pi }$$\left(3,$

 Β Β Β Β Β  $\beta ©\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{1},{a}_{1},{r}_{1}\beta ͺ,$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{1},{s}_{1},{r}_{1}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{1},{n}_{11},{r}_{1}\beta ͺ,$ $\mathrm{\pi \pi \pi }-4$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{1},{n}_{12},{r}_{1}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-5$ $\mathrm{\pi \pi \pi }-4$ $\mathrm{\pi ‘}-\beta ©{o}_{2},{a}_{2},{r}_{2}\beta ͺ,$ $\mathrm{\pi \pi \pi }-6$ $\mathrm{\pi \pi \pi }-4$ $\mathrm{\pi ‘}-\beta ©{o}_{2},{s}_{2},{r}_{2}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-7$ $\mathrm{\pi \pi \pi }-4$ $\mathrm{\pi ‘}-\beta ©{o}_{2},{n}_{2},{r}_{2}\beta ͺ,$ $\mathrm{\pi \pi \pi }-8$ $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi ‘}-\beta ©{o}_{3},{a}_{3},{r}_{3}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-9$ $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi ‘}-\beta ©{o}_{3},{s}_{31},{r}_{3}\beta ͺ,$ $\mathrm{\pi \pi \pi }-10$ $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi ‘}-\beta ©{o}_{3},{s}_{32},{r}_{3}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-11$ $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi ‘}-\beta ©{o}_{3},{n}_{31},{r}_{3}\beta ͺ,$ $\mathrm{\pi \pi \pi }-12$ $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi ‘}-\beta ©{o}_{3},{n}_{32},{r}_{3}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-13$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{4},{a}_{4},{r}_{4}\beta ͺ,$ $\mathrm{\pi \pi \pi }-14$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{4},{s}_{4},{r}_{4}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-15$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{4},{n}_{41},{r}_{4}\beta ͺ,$ $\mathrm{\pi \pi \pi }-16$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{4},{n}_{42},{r}_{4}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-17$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©{o}_{4},{n}_{43},{r}_{4}\beta ͺ,$ $\mathrm{\pi \pi \pi }-18$ $\mathrm{\pi \pi \pi }-6$ $\mathrm{\pi ‘}-\beta ©{o}_{5},{a}_{5},{r}_{5}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-19$ $\mathrm{\pi \pi \pi }-6$ $\mathrm{\pi ‘}-\beta ©{o}_{5},{s}_{5},{r}_{5}\beta ͺ,$ $\mathrm{\pi \pi \pi }-20$ $\mathrm{\pi \pi \pi }-6$ $\mathrm{\pi ‘}-\beta ©{o}_{5},{n}_{5},{r}_{5}\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-21$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©0,1,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-22$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©5,1,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-23$ $\mathrm{\pi \pi \pi }-5$ $\mathrm{\pi ‘}-\beta ©12,1,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-24$ $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi ‘}-\beta ©0,2,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-25$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©6,2,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-26$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©15,2,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-27$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©22,2,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-28$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©0,3,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-29$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©8,3,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-30$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©13,3,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-31$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©5,4,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-32$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi ‘}-\beta ©20,4,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-33$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©0,5,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-34$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©7,5,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-35$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©12,5,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-36$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©22,5,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-37$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©0,6,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-38$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©7,6,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-39$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©12,6,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-40$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©22,6,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-41$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©0,7,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-42$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©7,7,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-43$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©12,7,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-44$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©22,7,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-45$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©0,8,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-46$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©7,8,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-47$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©12,8,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-48$ $\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi ‘}-\beta ©22,8,1\beta ͺ\beta ͺ,$ Β Β Β Β Β  $\beta ©\mathrm{\pi \pi \pi }-1$ $\mathrm{\pi }-\beta ©0,0,0\beta ͺ$ $\mathrm{\pi }-\beta ©1,1,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-2$ $\mathrm{\pi }-\beta ©0,0,0\beta ͺ$ $\mathrm{\pi }-\beta ©2,1,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-3$ $\mathrm{\pi }-\beta ©0,0,0\beta ͺ$ $\mathrm{\pi }-\beta ©3,1,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-4$ $\mathrm{\pi }-\beta ©0,0,0\beta ͺ$ $\mathrm{\pi }-\beta ©4,1,1\beta ͺ,$ Β Β Β Β Β Β  $\mathrm{\pi \pi \pi }-5$ $\mathrm{\pi }-\beta ©0,0,0\beta ͺ$ $\mathrm{\pi }-\beta ©5,1,1\beta ͺ,$ $\mathrm{\pi \pi \pi }-6$ $\mathrm{\pi }-\beta ©0,0,0\beta ͺ$ $\mathrm{\pi }-\beta ©6,1,1\beta ͺ\beta ͺ\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).