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

priorities are given preference over integer variables with lower priorities. Further,<br />

variables that have priority values assigned to them are given preference over variables<br />

that don't. Priorities must be positive integers.<br />

public void setPriority(IloNumVar var,<br />

IloNum pri)<br />

This method sets the priority order for the variable var to pri. During branching,<br />

integer variables with higher priorities are given preference over integer variables with<br />

lower priorities. Further, variables that have priority values assigned to them are given<br />

preference over variables that don't. Priorities must be positive integers.<br />

public void setPWLFormulation(IloCplex::PWLFormulation f)<br />

This method allows you to control the way piecewise linear expressions are represented<br />

when <strong>CPLEX</strong> automatically transforms them during extraction.<br />

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

const IloNumArray dj,<br />

const IloNumVarArray var,<br />

const IloNumArray slack,<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. Zero can be passed for any of the parameters. However, if x or dj is<br />

not zero, var must not be zero either. Similarly, if slack or pi is not zero, rng must<br />

not be zero either.<br />

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

Similarly, dj[i] specifies the starting reduced cost for variable var[i]. For all<br />

ranged constraints specified in rng, slack[i] specifies the starting slack value for<br />

rng[i]. Similarly, pi[i] specifies the starting dual value for rng[i].<br />

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

the algorithm, provided that the AdvInd parameter is set to a value greater than or<br />

equal to one. In particular, if the extracted model is an LP, and the root algorithm is dual<br />

or primal, the information is used to construct a starting basis for the simplex method for<br />

the original model, if AdvInd is set to 1 (one). If AdvInd is set to 2, the information<br />

is used to construct a starting basis for the presolved model.<br />

If the extracted model is a MIP, only x values can be used, and a value must be specified<br />

for all variables of type ILOINT. If the provided values are compatible with an integer<br />

feasible solution, that solution becomes the incumbent for the next search; otherwise,<br />

the starting information is ignored. The parameter IloCplex::MIPStart must be<br />

turned on (that is, set to IloTrue) for the starting point to take effect.<br />

public IloBool solve(IloCplex::Goal goal)<br />

This method initializes the goal stack of the root node with goal before starting the<br />

branch & cut search. The search tree will be defined by the execute method of goal and<br />

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

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

Saved successfully!

Ooh no, something went wrong!