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::SolveCallbackI<br />

const IloNumArray pi,<br />

const IloRangeArray rng)<br />

This method allows a user to specify a starting point for the following invocation of the<br />

solve method in a solve callback. Zero can be passed for any of the parameters.<br />

However, if x is not zero, then var must not be zero either. Similarly, if pi is not zero,<br />

then rng must not be zero either.<br />

For all variables in var, x[i] specifies the starting value for the variable var[i].<br />

Similarly, for all ranged constraints specified in rng, pi[i] specifies the starting dual<br />

value for rng[i].<br />

This information is exploited at the next call to solve, to construct a starting point for<br />

the algorithm.<br />

protected void setVectors(const IloNumArray x,<br />

const IloNumVarArray var,<br />

const IloNumArray pi,<br />

const IloRangeArray rng)<br />

This method allows a user to specify a starting point for the following invocation of the<br />

solve method in a solve callback. Zero can be passed for any of the parameters.<br />

However, if x is not zero, then var must not be zero either. Similarly, if pi is not zero,<br />

then rng must not be zero either.<br />

For all variables in var, x[i] specifies the starting value for the variable var[i].<br />

Similarly, for all ranged constraints specified in rng, pi[i] specifies the starting dual<br />

value for rng[i].<br />

This information is exploited at the next call to solve, to construct a starting point for<br />

the algorithm.<br />

protected IloBool solve(IloCplex::Algorithm alg)<br />

This method uses the algorithm alg to solve the current node LP. See<br />

IloCplex::Algorithm for a choice of algorithms to use.<br />

protected void useSolution()<br />

A call to this method instructs IloCplex to use the solution generated with this<br />

callback.<br />

If useSolution is not called, IloCplex uses the algorithm selected with the<br />

parameters IloCplex::RootAlg for the solution of the root, or<br />

IloCplex::NodeAlg to solve the node.<br />

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

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

Saved successfully!

Ooh no, something went wrong!