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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

IloCplex::BranchCallbackI<br />

NodeData * data)<br />

For a branch specified by only one variable, this method offers the same facilities as<br />

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

of variables.<br />

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

IloNum bound,<br />

IloCplex::BranchDirection dir,<br />

IloNum objestimate,<br />

NodeData * data)<br />

For a branch specified by only one variable, this method offers the same facilities as<br />

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

of variables.<br />

protected NodeId makeBranch(const IloIntVarArray vars,<br />

const IloNumArray bounds,<br />

const IloCplex::BranchDirectionArray dirs,<br />

IloNum objestimate,<br />

NodeData * data)<br />

This method overrides the branch chosen by an instance of IloCplex. A method<br />

named makeBranch can be called zero, one, or two times in every invocation of the<br />

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

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

Each call specifies a branch; in other words, it instructs the invoking IloCplex object<br />

how to create a subnode from the current node by specifying new, tighter bounds for a<br />

set of variables.<br />

◆<br />

◆<br />

The parameter vars contains the variables for which new bounds will be set in the<br />

branch.<br />

The parameter bounds contains the new bounds for the variables listed in vars;<br />

that is, bounds[j] is the new bound to be set for vars[j].<br />

◆ The parameter dirs indicates the branching direction for the variables in vars.<br />

dir[j] == IloCplex::BranchUp<br />

means that bounds[j] specifies a lower bound for vars[j].<br />

dirs[j] == IloCplex::BranchDown<br />

means that bounds[j] specifies an upper bound for vars[j].<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!