30.01.2015 Views

ILOG CPLEX C++ API 9.0 Reference Manual

ILOG CPLEX C++ API 9.0 Reference Manual

ILOG CPLEX C++ API 9.0 Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IloCplex::BranchCallbackI<br />

BranchCallbackI::BranchType<br />

Inner Enumeration<br />

Description<br />

See Also<br />

Constructors<br />

Methods<br />

An instance of the class IloCplex::BranchCallbackI represents a user-written<br />

callback in an application that uses an instance of IloCplex to solve a mixed integer<br />

program (MIP). The user-written callback is called prior to branching at a node in the<br />

branch & cut tree during the optimization of a MIP. It allows you to query how the<br />

invoking instance of IloCplex is about to create subnodes at the current node and<br />

gives you the option to override the selection made by the invoking instance of<br />

IloCplex. You can create zero, one, or two branches.<br />

◆<br />

◆<br />

◆<br />

The method prune removes the current node from the search tree. No subnodes<br />

from the current node will be added to the search tree.<br />

The method makeBranch tells an instance of IloCplex how to create a<br />

subproblem. You may call this method zero, one, or two times in every invocation of<br />

the branch callback. If you call it once, it creates one node; it you call it twice, it<br />

creates two nodes (one node at each call).<br />

If you call neither IloCplex::BranchCallBackI::prune nor<br />

IloCplex::BranchCallBackI::makeBranch, the instance of IloCplex<br />

proceeds with its own selection.<br />

◆ Calling both IloCplex::BranchCallBackI::prune and<br />

IloCplex::BranchCallBackI::makeBranch in one invocation of a<br />

branch callback is an error and results in unspecified behavior.<br />

The methods of this class are for use in deriving a user-written callback class and in<br />

implementing the main method there.<br />

If an attempt is made to access information not available to an instance of this class, an<br />

exception is thrown.<br />

ILOBRANCHCALLBACK0, IloCplex::BranchDirection,<br />

IloCplex::Callback, IloCplex::CallbackI,<br />

IloCplex::MIPCallbackI, IloCplex::ControlCallbackI<br />

protected BranchCallbackI()<br />

This constructor creates a branch callback, that is, a control callback for splitting a node<br />

into two branches.<br />

protected IloNum getBranch(IloNumVarArray vars,<br />

IloNumArray bounds,<br />

<strong>ILOG</strong> <strong>CPLEX</strong> <strong>C++</strong> <strong>API</strong> <strong>9.0</strong> REFERENCE M ANUAL 87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!