I have a MILP that include a number of binary variables \(y_i, i \in I\).
Further, my MILP has the property that, if I fix a subset of my binary variables \(y_j, j \in J \subset I \), then there is only a unique integer feasible solution for all the other \(y_k, k \not\in J\) , which I can compute through a separate algorithm.
In order to speed up the solution of my MILP, I therefore plan to use callbacks at each MIPNode as follow:
At every MIPNode callback:
if all variables in the subset J are integral:
1. compute the only feasible solution for the other variables through an external code
2. set the solution with model.cbSetSolution()
3. Use solution with model.cbUseSolution()
However, I already know that this is the only integer solution that can be found going down this node, so I wouldn't want to waste time by further exploring the search down this node.
Hence, I was wondering whether Gurobi 9.1.2 offers any way to manually force pruning of a node after setting my solution or, alternatively, whether there is any work-around that would achieve the same result.
Thanks a lot in advance
P.S. Since I my model has binary variables which I don't ever want to branch (i.e. all the \(y_k, k \not\in J\), I thought about the possibilty of treating them as continous variables, but this would result in certain MIP relaxations to be seen as feasible and potentially produce a new incumbent solution, which clearly I don't want. Is there a way to force gurobi to discard an integer feasible solution from callback ?
Please sign in to leave a comment.