Originally posted by: derekan
Thank you so much, Eumpfenbach and Paul
Today, I picked several wrong cases and did some experiments that are easier to implement than you suggested:
here is the output of a wrong case:
Iter 0: gap is:1
+++++++++++++++++++++++++++
Iter 1: gap is:0.810442
+++++++++++++++++++++++++++
Iter 2: gap is:0.358167
+++++++++++++++++++++++++++
Iter 3: gap is:0.0690513
+++++++++++++++++++++++++++
Iter 4: gap is:<0
Then in the Master problem of Iter 4, I forced the solution to be the real optimal solution (real optimal facility location in my model) by adding constraints, the results are:
Iter 0: gap is:1
+++++++++++++++++++++++++++
Iter 1: gap is:0.810442
+++++++++++++++++++++++++++
Iter 2: gap is:0.358167
+++++++++++++++++++++++++++
Iter 3: gap is:0.0690513
+++++++++++++++++++++++++++
Iter 4: gap is:0.0895883 (MP is still feasible)
Note that if the optimal solution is cut off, the MP should be infeasible.
I think this result means that the new benders cuts do not cut off the real solution (the same is true for other wrong cases too), I guess the problem lies in the master problem. Maybe the "numerical instability" is the reason.
I do not know too much about how Cplex works, is this easy to solve?
I also turned off presolve by adding: cplex.setParam(cplex.PreInd, 0)
but the code still went wrong,
Iter 0: gap is:1
+++++++++++++++++++++++++++
Iter 1: gap is:0.32446
+++++++++++++++++++++++++++
Iter 2: gap is:0.21922
+++++++++++++++++++++++++++
Iter 3: MP infeasible
if I turn off the presolve and force the solution (of MP at Iter 3) to be the real optimal:
Iter 0: gap is:1
+++++++++++++++++++++++++++
Iter 1: gap is:0.32446
+++++++++++++++++++++++++++
Iter 2: gap is:0.21922
+++++++++++++++++++++++++++
Iter 3: gap is:0.123402 (MP is still feasible)
So I think now the problem is pretty clear, it is the Cplex that solves MP causing the problem.
#CPLEXOptimizers#DecisionOptimization