Skip to main content

Will Gurobi retain lazy cuts after changing the objective coefficients?

Answered

Comments

5 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff 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 why not try our AI Gurobot?.
  • Eli Towle
    Gurobi Staff Gurobi Staff

    Hi Austin,

    I'll assume you're asking about "lazy constraints" as opposed to "user cuts." For more information on the difference between these two, see this article.

    Lazy constraints are required for the underlying application; they cut off integer feasible solutions that would otherwise be feasible to the original model. All of these constraints are valid for the application, but are left out of the model formulation, usually because there are too many to enumerate (e.g., subtour elimination constraints in the traveling salesman problem). Changing the objective coefficients and re-solving the model will (almost certainly) result in a very different branch-and-bound tree that generates different lazy constraints. As such, Gurobi will discard any lazy constraints generated in an earlier solve of the model.

    I hope this helps!

    1
  • Fan YANG
    Gurobi-versary
    Conversationalist
    First Question

    Hi Eli,

    I meet a similar problem. Before re-solving, I need to change some constraints instead of the objective. I guess the Gurobi will also discard all of lazy constraints generated in an earlier solve. It this right?

    Many thanks.

     

    0
  • Eli Towle
    Gurobi Staff Gurobi Staff

    Yes, that's correct.

    0
  • Fan YANG
    Gurobi-versary
    Conversationalist
    First Question

    Dear Eli,

    Thanks for your reply! :)

    0

Post is closed for comments.