Skip to main content

Why the difference in time is considerable when I use Gurobi to solve the same model formulated by gurobipy and Pyomo respectively?

Answered

Comments

3 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Jaromił Najman
    • Gurobi Staff

    It is very possible that Pyomo adds variables and constraints to the model in a slightly different order. This can already have an impact on the model's performance, cf. Is Gurobi Optimizer deterministic?

    The time difference is found in the process of DPushes and PPushes

    You could try experimenting with the Crossover parameter to overcome this difference.

    Best regards, 
    Jaromił

    0
  • Zhanwei Liu
    • Gurobi-versary
    • First Comment
    • First Question

    Dear Jaromił,

    Thank you for your response.

    I will double-check the order of variables or constraints to re-test the solution speed.

    Best regards,

    Zhanwei

     

    0

Post is closed for comments.