Usercut callback via python : repeated cut
AnsweredHello everyone,
I am currently solving a MIP problem using Gurobi, and in my MIPNODE
callback, I generate and add cuts at the root node whenever I detect that the current relaxed solution violates certain constraints. According to my log files, after adding a cut that is violated by the current relaxed solution, Gurobi proceeds to find a new relaxed solution—yet I often identify the same cut as still being violated by that new solution.
I find this behavior puzzling, because I assumed that once a cut was added, any solution violating that cut would be excluded from the feasible region. However, the log suggests that subsequent relaxed solutions can still violate the same cut.
My question is: Is this behavior expected in Gurobi’s branch-and-cut procedure—i.e., does Gurobi sometimes revisit solutions that technically violate previously added cuts—or is there a particular detail in how I am adding cuts in the callback that might explain why these solutions reappear? I have included portions of my callback code and relevant log outputs below for reference.
Thank you very much for any insights or suggestions!
-
Hi Yilu,
I think a similar question was asked here last year. Please take a look at the following post:
https://support.gurobi.com/hc/en-us/community/posts/27095292925969/comments/27140622551825
- Riley
0
Please sign in to leave a comment.
Comments
1 comment