Skip to main content

Meaning of crushing user cuts

Answered

Comments

3 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Tomas,

    Does it mean that Gurobi found that the cuts I provided are redundant and where does removed?

    No. The message means that Gurobi was able to translate all user cuts from the original model into the presolved model and will be used therein. This may not always be possible, because some presolve reduction are quite complicated and some translations may run into trouble. Thus the message you see is a very positive message regarding your user cuts.

    Best regards, 
    Jaromił

    0
  • Tomas Pippia
    Gurobi-versary
    First Comment
    First Question

    Thank you very much Jaromił, that's very clear.

    I am now first creating the constraint and then changing their laziness attribute, i.e.

    lazy_constraints = model.addConstrs(...)
    for c in lazy_constraints.values():
    c.Lazy = -1

    This is unfortunately taking a long time. Is there a way to set the Lazy attribute during the constraint creation, i.e. inside addConstrs?

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    This is unfortunately taking a long time. Is there a way to set the Lazy attribute during the constraint creation, i.e. inside addConstrs?

    This is not possible. However, you should try using the setAttr method

    lazy_constraints = model.addConstrs(...)
    model.setAttr("Lazy",lazy_constraints,-1)
    0

Please sign in to leave a comment.