Cuts
AnsweredHi,
I am working on a minimization Problem.I get the result using Benders decomposition with Scip within almost 30 seconds but with gurobi it takes more that 8 minutes to solve.I want to generate stronger cuts but i do not know the corresponding code in gurobi.Can anyone help?
how should I use the code Cuts which is explained here : https://www.gurobi.com/documentation/9.1/refman/cuts.html
-
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 Shadi,
It is not unusual that the Bender's decomposition algorithm works very well for specific problems (or problem classes). Thus, it is not unexpected that SCIP's Bender's decomposition algorithm is faster than Gurobi for particular problem instances.
The link you posted refers to the Cuts parameter which controls Gurobi's internal Cut generation algorithm and does not allow you for the implementation of your own cuts. I guess what you are looking for are user cuts and lazy constraints. You can implement those via callbacks. One example for callback usage is the tsp.py example.
Best regards,
Jaromił0 -
Hello Mr.Najman
I assume that I did not explain my point correctly. I solve my minimization program using Benders Decomposition with both Scip and Gurobi. By Gurobi it takes 8 Minutes although by Scip it takes 30 Seconds. I wonder how i can find the problem and the main difference between these two.
In Gurobi I have written each step (Master Problem ,Primal Problem and Dual subproblem) individually and I thought maybe the Cuts I made are not strong enough. That is why I was looking for a code which strengthens the cuts.
Best Regards,
Shadi Beiki
0 -
Hi Shadi,
Thank you for the clarification. So you are using SCIP's Bender's decomposition algorithm while in Gurobi you are trying to more or less re-write the Bender's decomposition yourself. I am not aware of a general Gurobi code to strengthen Bender cuts.
You might want to have a deeper look into SCIP's implementation and literature and check whether your implementation is missing any idea implemented in SCIP. You could also check the lower bounds reported by SCIP with the ones you obtain with your algorithm to better locate when you are missing a cut.
Best regards,
Jaromił0
Post is closed for comments.
Comments
4 comments