Adding multiple cuts in a single node (branch-and-cut algorithm)
AnsweredHi all,
I am new to gurobi solver and currently implementing branch-and-cut algorithm with C++ & gurobi callback functions. I am trying to find a way to add multiple cuts in a single node in branching tree. I want to repeat the following steps in each single node until no cuts can be added:
Get LP relaxation solution -> Check if cut that I define can be added -> Add cut -> Solve LP & get sol-> check-> and so on.
In my experience with Xpress-solver, I can control whether call the cut-adding callback function once or repeatedly in each node by changing the return value of the function. However, It seems this is not possible, as Tobias in the below link said, "the root node is the only node for which we separate cuts in rounds. For all other nodes we would only call the cut separators (including the user callback) once, then resolve the LP and then branch."
But I believe there are other alternative ways to do this, even though there is no simple way (like setting return values), One possible option in my mind is to use loop in my function so that I can repeatedly get model objective and solve LP in the function until no separation is possible. But I am not sure this is the best. I kindly ask for your help in solving this problem. Any answers or comments sharing your experience will be appreciated.
Thanks in advance
Best regards,
Younsoo
1
-
Hi Jounsoo,
As you already said, there is no way for a user to control how many rounds of cuts in a node the solver will perform, nor to force which cuts to add, as the solver might decide not to add all cuts, or even to skip cuts for some nodes of the B&B tree. If your interest is on research, I would recommend using something like SCIP, or CBC, where you have access to the full code and can control in great detail what you can do in each step.
Sorry for not being able to give you more options.
Daniel
0
Please sign in to leave a comment.
Comments
1 comment