Skip to main content

Callback for customized branching

Answered

Comments

3 comments

  • Eli Towle
    Gurobi Staff Gurobi Staff

    Gurobi doesn't offer a branch callback. However, you can set branching priorities with the BranchPriority variable attribute.

    0
  • Mauro Dell'Amico
    Gurobi-versary
    First Question
    First Comment

    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
  • Eli Towle
    Gurobi Staff Gurobi Staff

    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

Please sign in to leave a comment.