Skip to main content

Gurobi optimization speed



  • Jennifer Locke
    Gurobi Staff Gurobi Staff

    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.  

  • Behnam Akbari
    First Comment
    First Question

    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


Please sign in to leave a comment.