Does the application of a callback function change the solution path?
AnsweredHi, Gurobi support team!
I'm currently working on branch-and-cut with user cut callback with gurobi 9.0.0 in python 3.8 environment.
The following questions are asked under the condition that all experiments were conducted on the same machine.
Experiment (A) used a callback function to add user cuts and set the "Cuts" parameter to 0.
I used the CUTCNT command in the callback function and saw a message saying that several cuts were applied. However, it was reported that the user cut was not applied in the final statistics of the MIP log.
Experiment (B) did not use the callback function and set the "Cuts" parameter to 0.
All other parameters have the same value and I solved the model with the same fingerprint.
However, the two experiments showed different solution paths. The former explored fewer nodes in a faster time.
So here's what I'm wondering about:
1. In Experiment (A), why is the number of user cuts counted through CUTCNT of the callback function different from the number of user cuts in the final statistic? I know that user cuts are often ignored. But if so, why several cuts are counted in the callback CUTCNT?
2. As reported in the final statistic in Experiment (A), if no cut was actually applied, I thought that the solution path should be the same since I used the same model and the same parameters on the same machine. However, the experimental results were different for (A) and (B). Can the application of the callback function also affect the experimental results?
Thank you in advance.
-
Official comment
This post is more than three 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 why not try our AI Gurobot?. -
Hi Jihye,
As commented in your other post, user cuts/lazy constraints can be useful only at a certain stage of the optimization process and then dropped later such that they do not occur in the "Cuts statistics". Thus, applying a callback function can certainly change the solution path in a positive or negative way. In your case, applying user cuts improves the performance of the optimization.
Best regards,
Jaromił0 -
Hi Jaromił,
My test results are being interpreted quite positively thanks to your answers.
I desperately needed an answer, thank you very much.Best regards,
Jihye0
Post is closed for comments.
Comments
3 comments