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
Please sign in to leave a comment.