Originally posted by: Trino
I tried to add a lazy constraint callback with an empty body and put my code only inside the user cut callback as you suggested, but if I do this, for some instances, cplex does not call the user cut callback, it just finish solving.
I also tried disabling some cplex parameters like the following:
cplex.setParam(IloCplex::Reduce, 0); //This is disabled when I add lazy constraints
cplex.setParam(IloCplex::PreLinear, 0); //also disabled when I add lazy constraints
cplex.setParam(IloCplex::PreInd, 0); //Disable presolve
But even disabling these options cplex finishes the execution before having the chance to enter the callback. The only way I could put the code to work was searching for cuts in both, the lazy constraint callback and the user cut callback, but I think this is a bad workaround I didn't want to rely on this.
I've attached a log of cplex using the empty lazy contraint callback and the user cut callback. Inside the user cut callback for this log I just put a
cout << "#####" << endl;
to indicate that cplex has called the callback, but as you can see it hasn't...
#CPLEXOptimizers#DecisionOptimization