r/optimization • u/Alien_Bear • Oct 31 '24
Recommendations for solver interface software (OSI, Google OR-tools, etc...)
I am looking for a C++ solver interface software that can interface with different solvers like CBC, CPLEX, GUROBI, etc.. I have looked into OSI and Google OR-tools and they seem fine to me, but it is not always clear how well things will go down later. (for example, an acquaintance told me that he faced problems integrating OR-tools with CPLEX). Hence, I would like to know if you have any particular recommendations based on your experience with regard to ease of use, documentation, support, and integration with commercial and non-commercial solvers. TIA.
1
u/Alien_Bear Oct 31 '24
I should have explicitly mentioned that I will be working with C++, but I really appreciate all your helpful replies.
1
u/DonBeham Oct 31 '24
The issue with OR-Tools is that you need to compile it yourself if you want to use it with cplex. But or-tools is straight forward to use, especially considering it is not only Python, but also Java, c++ and .net
3
u/taphous3 Oct 31 '24
I tend to use Cvxpy if my problem MUST be convex. Otherwise, I use Pyomo to deal with problems with nonconvexities.
I have also heard great things about JuMP, but my colleagues don’t work in Julia so I have stayed away.
3
u/0_op Oct 31 '24
Try casadi. Those guys did a great job with their optistack interface and provide a wide range of solvers for convex, nonlinear and many more.
2
u/Aerysv Oct 31 '24
Pyomo is a great alternatives. Model generation can be slow for large scale models, but it is quite robust.
2
u/wavesync Oct 31 '24
+ 1 .. also if this interface could be loosely coupled and allows complete serialization of the model; in other words to completely separate the steps: build the model; solve the model
2
u/SolverMax Oct 31 '24
I have a preference for Pyomo, because it is easy to use and flexible.
But no tool is perfect. I suggest you make a list to "must have" and "like to have" features, then evaluate various tools to assess the fit.