Skip to main content

How to define user cuts at a branch and bound node?

Answered

Comments

4 comments

  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Krypt,

    User cuts can be added at a branch and bound node using the Model.cbCut() method from the MIPNODE callback

    Best regards,
    Simran

    0
  • Krypt
    Curious
    Gurobi-versary
    Conversationalist

    Hi Simranjit,

    thanks for your answer. I also want to double-check if my understanding of user-defined cuts and lazy constraints is correct:

    User cuts: These shrink the search space to explore at a branch and bound node, resulting in a faster convergence. Having or not having these does not impact the feasibility of the original problem.

    Lazy constraints: These constraints help retain the feasibility of the problem at a branch and bound node, which would be otherwise infeasible if not defined. We only include them dynamically at a branch and bound node only when they are violated.

    Both types of constraints are implemented at a branch and bound node using a callback function.

    Are these correct?

    0
  • Simranjit Kaur
    Gurobi Staff Gurobi Staff

    Hi Krypt,

    User cuts are used to remove fractional solutions from the model, thereby making the LP relaxation of the model tighter, and hence potentially fast convergence. You are correct; they should not cut any integer feasible solutions of the model. Lazy constraints, on the other hand, are dynamically added to the model to remove integer feasible solutions that violate certain conditions. 

    For more details, please take a look at the article What is the difference between user cuts and lazy constraints?.

    Best regards,
    Simran

    0
  • Krypt
    Curious
    Gurobi-versary
    Conversationalist

    Thank you!

    0

Please sign in to leave a comment.