Control over the number of callbacks in MIPNODE
AnsweredHello,
I am currently implementing a Benders decomposition algorithm. I would like to add benders cut with model.cbLazy() both in MIPSOL and MIPNODE because it helps a lot to find better bounds and heuristic solutions.
However, I can't seem to be able to control the number of times the callback function is called at each node (MIPNODE). In some post I have seen that for the root node, one can change the values of the parameter Cuts and CutPasses but even with aggressive values the optimizer only makes a few calls to the callback function before starting to branch. Anyway, the root is not to much of a problem because I can craft my own benders loop to solve the root node prior to optimization.
My real problem is for the subsequent nodes, if I understood correctly there is no way to have more than one call to the callback function for each node of the branch and bound tree. So my question are the following :
1) Did I miss something? And then what is the right way to have several call to callbacks per tree node?
2) If there is no way, will this feature be added to Gurobi someday ? ( would be very useful for benders decomposition)
3) Is there a way to make my own loop as for the root node without having to recreate an entire branch and bound procedure (where I would loose access to all gurobi features like heuristics, cuts, ...)
Thanks for your help !
Francois
-
Hi Francois,
Could you elaborate a bit more on why you would like to call a MIPNODE callback multiple times for a single node? Usually, for decomposition algorithms, it is enough to retrieve node information once, construct a cut or perform any required changes to the model, i.e., run a Bender's loop on an axuiliary model, and proceed with the next node.
Best regards,
Jaromił0 -
Hello,
thanks for your time.
For benders decomposition, I want to add more than one benders cut per node. Because the MIPNODE callback is my separation for the benders cuts (with an auxiliary model inside it) I want to call it multiple times in order to retrieve multiple cuts and further strengthen the linear relaxation at each.
More specifically, I would like to do the following loop several times at each node :
1) get the solution of the linear relaxation at the current node
2) generate (with the MIPNODE callback) a benders cut that is cutting the current solution
3) add the cut to the model and resolve the relaxation of the current node
I didn't find a way to obtain the same result with only one call to the callback function because I can't re-optimize the relaxation of the node without getting out of the callback.
Best regards,
Francois
0 -
Hi Francois,
Thank you for the clarification. Unfortunately, there is no workaround to achieve the goal you have. Currently, there are also no plans for such a feature but we will discuss your suggestion internally.
For now, the only way I see is to implement an own B&B algorithm where you use Gurobi to solve the node relaxations. The implementation would be similar to spatial B&B solvers, which use a (MI)LP solver to solve node relaxation. This way, you would have full control of each node and branching decisions.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
3 comments