Base class for user-written callbacks that control branching.
For a list of all members of this type, see Cplex.BranchCallback Members.
System.Object
ILOG.CPLEX.Cplex.Callback
ILOG.CPLEX.Cplex.MIPCallback
ILOG.CPLEX.Cplex.ControlCallback
ILOG.CPLEX.Cplex.BranchCallback
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
This is an advanced class.
Important:
Advanced classes typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other classes instead.
This is the base class for user-written callbacks that control branching during the branch-and-cut search. This callback will be called prior to the creation of the children of the current node. It allows you to query how the invoking instance of Cplex
is about to create the children, and gives you the opportunity to override creation of this branch.
You can create one or two branches by calling one of the makeBranch
methods once or twice. It is an error to call makeBranch
more than twice.
By calling method prune
, you remove the current node from the search tree. In other words, no subnodes from the current node will be added to the search tree. Calling both prune
and makeBranch
in one invocation of a branch callback is an error and yields unspecified behavior.
If you call neither prune
nor makeBranch
, the instance of Cplex
proceeds with its own branching.
The constructor and methods of this class are protected to make sure that they are used only to derive a user-written callback class or to implement the main
method in it.
Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll)