addCut ignored despite PreCrush=1 in Branch-and-Cut implementation
回答済みHello,
I'm implementing a Branch-and-Cut algorithm for my problem using Gurobi, and I'm trying to add problem-specific user cuts through the callback. I have set the following parameters:
PreCrush = 1
Method = 0
MIPFocus = 3
TimeLimit = 3600
Despite setting PreCrush = 1 as required, I still receive the following warning during execution:
Warning: Cut ignored, set PreCrush parameter to guarantee that a cut can be applied to the presolved model!
To make it work, I tried setting LazyConstraints = 1, and the cuts are then accepted. However, I’m using addCut in my callback, not addLazy. My understanding is that LazyConstraints = 1 is meant for lazy constraints, not user cuts.
Is it expected behavior that I need to set LazyConstraints = 1 for addCut to work? Or is there something else I might be missing in how user cuts should be added to a presolved model?
-
Hi Eliass,
You are correct, you shouldn't need to set LazyConstraints to add cuts.
The fact you are setting PreCrush=1 but getting the warning is unexpected.
Any chance you can paste a Gurobi logfile and a link to your code?
- Riley
0 -
Hi Riley,
Thanks for the reply. I’ve created a small, self-contained example that reproduces the issue. Since the code is part of an unpublished research project, I’d prefer to share it privately. Could you please let me know the best way to send it securely?
Eliass0 -
Hi Eliass,
I'll create a ticket through our Help Center, then you can upload through that.
You'll receive an email shortly!
- Riley
0
サインインしてコメントを残してください。
コメント
3件のコメント