1
$\begingroup$

enter image description here

Attempt

Let $x_i$ be the number of workers to be hired that starts its shift on day $i$. So we want to minimize the function $f( {\bf } ) = \sum_{i=1}^7 x_i$. The constraints:

$$ x_1 \leq 17 $$ $$ x_1 + x_2 \leq 13 $$ $$ x_1 + x_2 + x_3 \leq 15 $$ $$ x_1+x_2+x_3+x_4 \leq 19 $$ $$x_1 + x_2 + x_3 + x_4 + x_5 \leq 14 $$ $$ x_2 +x_3 + x_4 + x_5 + x_6 \leq 16 \; \; \; \text{day 1 needs 2 days off} $$ $$ x_3 + x_4 + x_5 + x_6 + x_7 \leq 11 $$ $$ x_i \geq 0 $$

Is this a correct formulation?

$\endgroup$
  • $\begingroup$ On day one, if you require $17$ workers, then you need AT LEAST $17$ workers. On day two, if you require $13$ workers, then you need AT LEAST $13$ workers etc. $\endgroup$ – Retty Oct 21 '18 at 6:07
2
$\begingroup$

Not really.

Guide:

The nurse who are present on day $1$ are the ones who start from day $4,1,5,6,7$. Hence,

$$x_1 + x_4 + x_5 + x_6 + x_7 \ge 17.$$

Use the same strategies on various days.

Also, we have to impose nonnegative integer constraints and remember to write down the objective function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.