So for an assignment I have to find the schedule that minimizes the sum of absolute differences
between the demanded and scheduled number of workers per time interval by solving an
integer linear optimization model.

So I modeled my schedule as a set cover problem and created a row with the demanded number of workers and a row with the actual number of workers.

[![enter image description here](https://i.stack.imgur.com/xG4DI.png)](https://i.stack.imgur.com/xG4DI.png)

I take the summation of the absolute differences between the rows as object and try to minimize that.

```
=SUM(ABS(C39:Z39-C33:Z33))

```

However I get the error "**The linearity conditions required by LP solver are not satisfied**" and I don't get why since the Linearity report says ***yes*** on everything.

[![enter image description here](https://i.stack.imgur.com/CC1Ai.png)](https://i.stack.imgur.com/CC1Ai.png)

\**X\_i is the number of times a shift is chosen.*