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

Attempts to find a feasible relaxation of an active model by relaxing the bounds of the<br />

constraints specified in rngs as specified in rnglb and rngub. This is a special<br />

version of the method feasOpt(IloRangeArray, IloNumArray,<br />

IloNumArray, IloNumVarArray, IloNumArray, IloNumArray,<br />

IloBool)<br />

The method returns IloTrue if a feasible relaxation is found along with a solution<br />

for it.<br />

public IloBool feasOpt(const IloNumVarArray vars,<br />

IloNumArray varlb,<br />

IloNumArray varub,<br />

IloBool optimize)<br />

Attempts to find a feasible relaxation of an active model by relaxing the bounds of the<br />

variables specified in vars as specified in varlb and varub. This is a special version<br />

of the method feasOpt(IloRangeArray, IloNumArray, IloNumArray,<br />

IloNumVarArray, IloNumArray, IloNumArray, IloBool)<br />

The method returns IloTrue if a feasible relaxation is found, along with a solution<br />

for it.<br />

public IloBool feasOpt(const IloRangeArray rngs,<br />

IloNumArray rnglb,<br />

IloNumArray rngub,<br />

const IloNumVarArray vars,<br />

IloNumArray varlb,<br />

IloNumArray varub,<br />

IloBool optimize)<br />

The method feasOpt computes a minimal relaxation of the bounds of variables and<br />

constraints that make the active model feasible. For each bound, the user may specify a<br />

preferred value indicating how much a relaxation of that bound is acceptable. A<br />

negative or 0 (zero) value indicates that the corresponding bound must not be relaxed.<br />

Typically, values greater than or equal to 1 (one) should be used. The preference value<br />

for relaxing the lower and upper bound of constraint rngs[i] must be provided in<br />

rnglb[i] and rngub[i], respectively. Similarly, the preference value for relaxing<br />

the lower and upper bound of constraint vars[i] must be provided in varlb[i] and<br />

varub[i], respectively.<br />

If enough variables or constraints were allowed to be relaxed, the function will return<br />

IloTrue and IloFalse otherwise. In case of success, the routine returns with<br />

suggested relaxed values that would make the active model feasible. These bounds are<br />

chosen in such a way that the relaxation is minimal in the sense that the sum of<br />

(relaxation amount)/(preference value) over all variables and constraints is minimized.<br />

The bounds that make the model feasible are returned in the same arrays as the<br />

preference values are passed into this method. That is, after successfull termination of<br />

the method feasOpt, rnglb[i] and rngub[i] contain the lower and upper bound<br />

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

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

Saved successfully!

Ooh no, something went wrong!