Callback for customized branching
AnsweredIs there any callback function or other method to impose a customized branching rule at a MILP search node, or to impose a priority for the selection of the branching variables ?
I refer to something as the branch callback by cplex or xpress, or the branch priority file by cplex.
-
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?. -
Gurobi doesn't offer a branch callback. However, you can set branching priorities with the BranchPriority variable attribute.
0 -
Thanks for pointing to my attention this attribute. Just another question: can we set this value dynamically (I mean, at each node of a B&B tree, inside a callback) or we have to fix it when defining the model ? I know that Gurobi modifies the model at the presolve phase, before starting the B&B, so I have some doubt about the effect of a change of this parameter in a callback.
To be more clear we are working with some machine learning mechanism and we want to experiment their effect in guiding the B&B. As you know some method aims to produce a ranking of the variables which is independent of the evolution of the tree, so a prefixed priority list is ok, but other, and more interesting methods, tries to adapt the rule to the evolution of the tree. In this case we need to adopt a MILP solver that allows to define a possibly different ordering at each node.
0 -
The BranchPriority attributes must be fixed when defining the model, so you unfortunately won't be able to use them to implement a dynamic branching strategy.
0
Post is closed for comments.
Comments
4 comments