How to use non-defaults solution algorithm in Gurobi?
AnsweredHello, I am writing a MIP model in Gurobipy. As I understand from documentation that Gurobi by default uses B&C algorithm to solve a MIP problem. How can I use another solution algorithm (if any other is available in Gurobi out-of-the-box) instead of B&C?
I think I can write a callback function to call other algorithms, but not sure what algorithms are available in Gurobi. I intend to use Progressive Hendging or some algorithm specialized for Stochastic programming.
Note: I am an intermediate-level user of Gurobi.
-
Hi Tanmoy,
The Gurobi Optimizer uses an LP-based Branch-and-Bound (B&B) algorithm to solve a MIP. The B&B algorithm has multiple building blocks including presolve, relaxation, node selection, branching, cutting planes, heuristics, and conflict analysis. The main idea of B&B is to keep track of two bounds and close their gap as fast as possible.
In a minimization problem, an upper bound represents the objective value of the best feasible solution found so far and a lower bound represents the best objective value that can be possibly found. We refer to the former as incumbent and to the latter as best bound.
Gurobi uses its different building blocks to expedite the process of finding good bounds and closing their gap.
As a user of Gurobi, you can potentially control how fast a good incumbent is found via 1) setting parameters such as Heuristics, NoRelHeurTime, MIPFocus=1, and RINS, for example, 2) providing a start solution, 3) providing custom heuristic solutions via callbacks.
You can also potentially control how fast a good bound is found via 1) setting parameters such as Presolve=2, Cuts=2|3, MIPFocus=2|3, VarBranch=3 for example, and 2) providing valid user cuts via callbacks.
You might check our documentation on MIP - A Primer on the Basics for an introductory description of how B&B works.
Best regards,
Maliheh
1 -
Appreciate it. I will aim for that.
0
Please sign in to leave a comment.
Comments
2 comments