I would like to create a rota that repeats every 28 days and adheres to the usual rules. These include the minimum/maximum number of consecutive working days and the break days. I have created a model that adheres perfectly to these rules within the period, but has problems with the transitions from $t=28$ to $t=1$. How do I need to adjust my constraints to make it work? These are my constraints.
$$\sum_{d=t-6}^{t}\sum_{k\in K}^{}x_{idk}\le 6\quad\forall i\in I,~t\in \left\{ 7,\ldots,T \right\}$$
$$\sum_{d=t+1}^{t+4}y_{id}\ge 4\cdot(y_{i(t+1)}-y_{it})\quad\forall i\in I,~t\in \left\{ 1,\ldots,\mid T\mid -4\right\}$$
$$1+y_{it}\ge y_{i(t-1)}+y_{is} \quad\forall i\in I, s\in \left\{ t+1,\ldots,t+2 \right\},t\in\left\{ 2,\ldots,\mid T\mid-2 \right\}$$