Re: Benders cuts in OPL using CPLEX 12.7.1

Hi PaulRubin

i really appreciate your effort in response to the queries. my situation is the second case i.e. 

” the subproblem does not come from the original, full MIP model, but arises externally. If that is the case, meaning you do not have a MIP model with all the variables and constraints in it to start, you cannot use annotation. So you either need to drop OPL and switch to an API that allows callbacks (C, C++, Java, …) or you need to stick with OPL, write a script that alternates between master and subproblem, and do this the way Jack Benders originally did. That means you solve the master (either to “optimality” or to some time or solution limit), test the solution in the subproblem and, if the subproblem generates any cuts, add them to the master problem and the solve the master again (starting over each time)”.

i want to stick to OPL. so in this case if i use the flowcontrol in the OPL like first solve the main problem and then use this solution in the subproblem. if the subproblem is feasible with the solution from the main problem then there is no issue in the program. but in case if the solution is infeasible then i need to add cuts to the main problem to start over with the cuts and then solve again the main problem. if the solution from the main problem is then feasible with the subproblem then the program proceeds. so in this case how can i add cuts to the main problem without benders decomposition without anootations?  

Thanks again for such a quick response

Source: Re: Benders cuts in OPL using CPLEX 12.7.1