Translating from Problem to Equation in an Integer Programming Problem

24 Views Asked by At

A problem was proposed to me by my superiors, which they asked me to solve by writing a program, and goes like this:

There are beds for 18 patients of diagnosis $P_{D}$ on a unit (let's call it $U_D$). 12 patients can have remote monitoring (let's call that $P_{DT}$) on this unit. However if there are more than 18 patients of $P_{D}$ or more than 12 patients requiring monitoring ($P_{DT}$), then they are considered overflow and will be sent to another unit that is shared by other patients ($P_O$).

However it seems that a better way to describe these conditions would be to use integer programming. I have a very limited exposure to the field, and after using Google and reading tutorials, I am trying to model the two overflow conditions presented here. So far I have come up with something like:

18 $\geq$ $P_{D}$ + $P_{DT}$ + $Z_D$

12 $\geq$ $P_{DT}$ + $Z_{DT}$

Where $Z_D$ is a binary variable corresponding to whether the total beds in the unit have overflow and $Z_{DT}$ is the binrary variable corresponding to whether the number of patients requiring remove monitoring have overflow. Is this correct?

Furthermore, if these patients only arrive at the other unit after overflow requirements are fulfilled, and if this other unit has capacity for 20 patients, would the equation look like:

20 $\geq$ $P_O$ + ($Z_D$) $P_D$ + ($Z_{DT}$) $P_{DT}$

Thank you.