Can someone explain the mechanism of solving MIP with Gurobi Solver


(Samsong) #1

I’m currently using cvx to solve a mixed integer programming problem with constraints like norm(x) + norm(y) <= c. CVX with Gurobi Solver can solve it well but is not fast enough. Thus I’m thinking of solving it directly in Gurobi with C++. But after reading the manual, I find Gurobi only supports linear and quadratic constraints.

Then I’m very curious about how cvx is working with Gurobi Solver to solve a problem that Gurobi can’t solve. My original thinking was that cvx was calling Gurobi’s api directly, but I’m confused now because constraints like norm(x) + norm(y) <= c are not valid. Can someone briefly explain to me how cvx solves MIP with non-linear/non-quadratic constraints?


(Michael C. Grant) #2

(Michael C. Grant) #3

This simply isn’t the proper forum for general help with Gurobi (or indeed any solver), so I am closing this topic. But the key point is that CVX is doing far more than just “calling Gurobi’s API directly”. That’s why it is so useful for people! That said, if Gurobi is too slow, I don’t see how you can expect it to be faster just by coding it in C++.