Originally posted by: Khronum
I am using CPLEX 12.3 on MATLAB 64 bit.
I have noticed that if I run the following pseudocode with the default parameters:
1) Create a cplex object to define a model with constraints_1
2) solution_1 = cplex.Solve
3) Reuse the cplex object to define a new model with constraints_2 (e.g. cplex.Model.A = new_A;)
4) solution_2 = cplex.Solve
5) Add constraints_3 with cplex.addRows
6) solution_3 = Solve
CPLEX returns in solution_3 the same solution as in solution_1 even though there is a better for solution_3 (that I can obtain if instead of reusing a cplex object in step # 3, I create a new cplex object).
My question is: Why does this happen? It looks like cplex prefers to reuse an old solution (solution_1) to fill in solution_3 instead of trying to solve the problem again (which I know would give a better solution).
#CPLEXOptimizers#DecisionOptimization