Gurobi optimization speed
Dear all
I’m currently modeling my problem in MATLAB and calling Gurobi solver via MATLAB for the optimization. Some researchers have referred to the parallel computation and speed priorities of other interfaces than MATLAB. Therefore, I would appreciate your explaining if switching to other interfaces such as Python or Julia for using Gurobi optimizer can potentially decrease the “solver time”.
Thank you and best regards
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Where are you spending your time? Is it in modeling or in solving your model?
Gurobi's API's are wrappers to our C API, the solver performance will be the same whether you are using MATLAB or Python. For a more detailed explanation see the following knowledge base article here.
If you are spending most of your time in model building, Gurobi's Python API does offers very nice features that make programming your model easier and many of the API's have been optimized to perform well. With that said, in any language, how you write your program can impact performance, either negatively or positively.
If you are interested in moving to Python, we encourage you to check out the Python tutorial video series here, under the Videos on Modeling with Gurobi and Python. In Gurobi 8.0, we made significant improvements to the MATLAB API, before switching to a new language, check out this video to see if there may be ways to improve your MATLAB code.
1 -
Thank you very much for your comprehensive response.
I am using YALMIP for the modeling part. In a simplified version of my problem, the yalmiptime and solvertime are reported 10.8 and 24.2 seconds, respectively. Is the solvertime reported split into modeling and solving you described or it only the solving part?
I already know that Gurobi interface for Julia is not officially supported. But given the current state of JuliaOpt, how do you compare its efficiency with MATLAB and Python APIs?
Many thanks in advance
1
Post is closed for comments.
Comments
3 comments