Originally posted by: SamirUSebbane
Hi all,
I changed the benders example distributed with 12.4 to solve the magic square problem in Constraint programming.
I decomposed the model into 2 parts, the first contains the summation constraints on the rows, columns.
The second set (larger set of constraints) is composed of all different constraints Xij ! Xipjp, of course I linearized these constraints by adding a new variables y.
xij != xXipjp <-----> ( Xij - Xipjp + BigM*y >=1 and Xij - Xipjp + (y+1)*BigM <= BigM).
I followed the same approach used in benders.cpp, ILP model and separation procedure that constructs lazy cuts and user cuts.
Each time a violated cut is identified I add it to the model. However, cplex does not change the model, does not use the cuts (the final solution is violating the added cuts).
In another model for the same problem, I exported the model, and removed the sentence "LAZY CONSTRAINTS", so that, all the constraints are regular constraints, then, I obtained the optimal solution which satisfies the violated lazy constraints (in this case they are regular constraints.)
Any idea why cplex is not considering these violated cuts?
Thanks
Samir,
#CPLEXOptimizers#DecisionOptimization