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 />

This method offers the same facilities as the other methods<br />

IloCplex::BranchCallbackI::makeBranch, but for a branch specified by a<br />

set of constraints and a set of variables.<br />

protected NodeId makeBranch(const IloConstraintArray cons,<br />

const IloNumVarArray vars,<br />

const IloNumArray bounds,<br />

const IloCplex::BranchDirectionArray dirs,<br />

IloNum objestimate,<br />

NodeData * data)<br />

This method offers the same facilities as the other methods<br />

IloCplex::BranchCallbackI::makeBranch, but for a branch specified by a<br />

set of constraints and a set of variables.<br />

protected NodeId makeBranch(const IloConstraint con,<br />

IloNum objestimate,<br />

NodeData * data)<br />

This method offers the same facilities for a branch specified by only one constraint as<br />

IloCplex::BranchCallbackI::makeBranch does for a branch specified by a<br />

set of constraints.<br />

protected NodeId makeBranch(const IloConstraintArray cons,<br />

IloNum objestimate,<br />

NodeData * data)<br />

This method overrides the branch chosen by an instance of IloCplex, by specifying a<br />

branch on constraints. A method named makeBranch can be called zero, one, or two<br />

times in every invocation of the branch callback. If you call it once, it creates one node;<br />

it you call it twice, it creates two nodes (one node at each call). If you call it more than<br />

twice, it throws an exception.<br />

◆<br />

◆<br />

◆<br />

The parameter cons specifies an array of constraints that are to be added for the<br />

subnode being created.<br />

The parameter objestimate provides an estimate of the resulting optimal<br />

objective value for the subnode specified by this branch. The invoking instance of<br />

IloCplex may use this estimate to select nodes to process. Providing a wrong<br />

estimate will not influence the correctness of he solution, but it may influence<br />

performance. Using the objective value of the current node is usually a safe choice.<br />

The parameter data allows you to add an object of type<br />

IloCplex::MIPCallbackI::NodeData to the node representing the branch<br />

created by the makeBranch call. Such data objects must be instances of a userwritten<br />

subclass of IloCplex::MIPCallbackI::NodeData.<br />

protected NodeId makeBranch(const IloIntVar var,<br />

IloNum bound,<br />

IloCplex::BranchDirection dir,<br />

IloNum objestimate,<br />

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

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

Saved successfully!

Ooh no, something went wrong!