Skip to main content

Meaning of crushing user cuts

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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

    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

    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

Post is closed for comments.