I am solving an MILP optimization with binary variables in MATLAB in which I want to find more than one optimal solution by excluding previous solutions. Therefore, I know I must include the following integer cut as a constraint in my model:
sum {y_j : y'_j = 1} + sum {(1-y_j) : y'_j = 0} <= M – 1
Where, y_j is my vector of binary variables. M is the total number of binary variables (j loops from 1 to M) and y'_j is the value of my binary variable in a previous solution. Thus, if yj in the next optimization round takes values equal to those in a previous solution (y'_j), that solution is ruled out.
In an MILP framework, constraints are included through a matrix A in the form: A* x <= b, where x is the vector of binary variables and b the RHS of known coefficients.
Then, my problem is I am unable to "translate" a constraint like the one above into this MILP format. I suppose that the M-1 part goes in vector b, but I am unable to find some constants in matrix A such that A* x gives the expression on the LHS of my constraint.
Thank you very much for your help,
Best Answer