Skip to main content

Is the original model or presolved model dictating the algorithm?

Answered

Comments

4 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.
  • Jonasz Staszek
    • Community Moderator
    • Gurobi-versary
    • Thought Leader
    • First Question

    Hi Elina,

    AFAIK it is the presolved model. Perhaps someone from the Gurobi team can confirm this?

    The log suggests that presolve added both constraints and variables. This could be due to the linearization of the quadratic and general constraints you included. This usually simplifies the model and allows for its faster solution.

    To compare the two models - original and presolved - you could try:

    model1 = model.presolve()
    model1.write("presolved_model.lp")

    Hope this helps.

    Best regards,
    Jonasz

    1
  • Simon Bowly
    • Gurobi Staff

    Yes, the presolved model structure dictates the algorithm that is used. If the presolved model is an MILP, then in general branch and bound is needed to guarantee a result.

    Most likely, one of the general constraints required an auxiliary binary variable to be added to the model in order to handle it. So, the model is not really continuous.

    0
  • Elina Joksch
    • Gurobi-versary
    • Conversationalist
    • Curious

    Thank you very much! This helped me a lot!

    0

Post is closed for comments.