Team Up Feasibility Calculation by Optimizer
I am working on a simple team member setting model using optimizer but it keeps returning "The problem is infeasible" error.
Here is my model:
- The module consist of a Nurse List and a Doctor List. It has three line items : Team, Success, and Team Up Constrain.
Team - It is the variable for optimizer. In optimizer, it has been set to integer Min = 0 and Max = 1
Success - It is a constant value (0 or 1). It indicates whether a specific Doctor-Nurse combination is workable or not. (0 - Not Work, 1 - Work).
Team Constrain - It is the constrain line item for Optimizer.
Here is the setting in Optimizer
In Team Constrain, I did try the below:
a) Team * Success >= 1
b) Team * Success = 1
c) Team * Success <= 1
Both a and b returned infeasible error. c return success but the solution is all zero in Team line item.
It is appreciated if any one of you can help or point me to the right direction.
It looks like constraint (a) and (b) are not feasible because it requires all the combinations Doc/Nurse to be true (since the "summary" of "Team Up Constrain" is "All").
Contraint (c) returns a solution with all zeros in "Team" line item, which is correct according to the constraint definition. I think you are just missing a second constraint that says "each doctor needs to be have at least one nurse assigned".
You can this for example :0
Turn Success around the other way: (1 - Not work, 0 - Work).
Now, change the Team Up Constraint to equal zero: Team * Success = 0
The result is that pairs of Doctors and Nurses will only be assigned if they have a Success flag = 0 (work).0