Originally posted by: Mahdi-N
Thanks Daniel,
I have not worked with CPLEX like this for a long time and forgotten some bits.
I have a simple optimality cut which is based on Laporte and Louveaux 1993. The procedure is as follows:
1) build the master model
2) invoke cplex.use(BendersLazyCallback(...))
3) in the lazy cut function a function gets the solution of the second stage problems.
4) The following optimality cut is formed and added:
add(optcut-(exp_cost-LB)*(w_sumcut1-w_sumcut0)+(exp_cost-LB)*(n_ones-1)-LB>=0).end();
where optcut is a variable added to the master problem obj function, LB is the lower bound and here is 0 and exp_cost is the expected cost of the second-stage problem.
In addition to repeated solutions, another problem is that when the algorithm stops after the pre-set number of iterations, I get a solution which is not right.
Meaning that it only gives the objective function value of the master problem without optcut i.e., the objective of the second stage problem is ignored.
What is wrong here?
#CPLEXOptimizers#DecisionOptimization