Originally posted by: Ibrahim_Capar
Dear all,
I have a maximization problem with following structure:
Max cX
subject to:
AX + DY <=b
X>=0, Y >=0 and integer.
I coded the problem using C++ and CPLEX 12.7.1. I followed the structure in ``ilobendersatsp.cpp." For CPLEX settings, I have following commands:
cplex.setParam(IloCplex::Param::Parallel, 1);
cplex.setParam(IloCplex::Param::Preprocessing::Presolve, IloFalse);
cplex.setParam(IloCplex::Param::Threads, 1);
cplex.setParam(IloCplex::Param::MIP::Strategy::Search, IloCplex::Traditional);
cplex.use(BendersLazyCallback(env, ...)); //ILOLAZYCONSTRAINTCALLBACK
Below, I provide cuts generated for a small example:
(1) Obj: 330 BestSol:330 Sol: [-0, -0, 1, -0, 1, -0, -0, -0]
(2) Obj: 30 BestSol:165.3 Sol: [1, 1, 0, 0, 0, 0, 0, 0]
(3) Obj: 30 BestSol:165.3 Sol: [1, 1, 0, 0, 0, 0, 0, 0]
(4) Obj: 150 BestSol:165.3 Sol: [0, 1, 1, -0, -0, -0, -0, -0]
(5) Obj: 100 BestSol:165.3 Sol: [0, 1, 1, -0, -0, -0, -0, -0]
(6) Obj: 150 BestSol:150.521 Sol: [0, 1, -0, -0, 1, -0, -0, -0]
(7) Obj: 125 BestSol:150.521 Sol: [0, 1, -0, -0, 1, -0, -0, -0]
(8) Obj: 140 BestSol:146.875 Sol: [1, 0, 1, -0, 0, -0, -0, -0]
(9) Obj: 140 BestSol:140 Sol: [1, 0, 0, -0, 1, -0, -0, -0]
(10) Obj: 130 BestSol:130 Sol: [1, 0, 1, -0, 0, 0, 0, 0]
Notice that (2) and (3) are identical solutions, but lazy constraint callback is invoked twice. Also in (4) and (5), for the same solution, there are two different objectives.
My question is this. What parameters should I include so that the callback is only invoked when the master problem is optimal?
Thank you in advance,
Ibrahim
#CPLEXOptimizers#DecisionOptimization