Originally posted by: SystemAdmin
There is no way to get back dynamic search if you use control callbacks.
First of all, I would try to verify whether it is really dynamic search that causes the difference. To do that, run your code
without callbacks and with dynamic search explicitly disabled (set parameter
MIPSearch to 1). If that also shows the big difference to the solve with dynamic search enabled then you can be pretty sure that dynamic search is involved.
A potential solution to your problem may be using a solution limit. I can imagine two ways of doing that:
1. Set an integer solution limit of 1. This will stop CPLEX as soon as the first solution is found or the problem is proven infeasible. If the problem is infeasible then stop. Otherwise remove the solution limit, install your callbacks and solve again.
2. Implement your algorithm in a loop instead of using callbacks: set the solution limit to 1. When CPLEX returns with the newly found solution run your phase 2, add the cuts that cut off the solution just found and call IloCplex::solve() again (again with solution limit 1). I am afraid that this approach may show worse performance than what you have right now
#CPLEXOptimizers#DecisionOptimization