I am solving a problem with lazy constraints using MOI callback interface. I want to know if there is a way to stop the branch-and-bound process when finding a new incumbent solution that is feasible? I don’t want to close the gap down.
If you do not care about the objective value, you can zero-out the objective. Any solver should terminate as soon as one feasible solution is found.
If you are using Gurobi, you can also use the parameter SolutionLimit. Setting it to 1 will make Gurobi terminate as soon as the first feasible solution is found (note that “feasible” includes “must satisfy all lazy constraints”). Other solvers may have a similar parameter, but I do know those as well.