Meaning of crushing user cuts
AnsweredHello, I implemented user cuts with enumerated constraints using the Lazy property of constraints. In the logs now I see:
"Crushed 5766 out of 5766 user cuts to presolved model"
Does it mean that Gurobi found that the cuts I provided are redundant and where thus removed?
-
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 -
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 = -1This is unfortunately taking a long time. Is there a way to set the Lazy attribute during the constraint creation, i.e. inside addConstrs?
0 -
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.
Comments
3 comments