Overview | Group | Tree | Graph | Index | Concepts |
This is an advanced routine. Advanced routines typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.
The routine CPXgetray
is used to find an unbounded
direction (also known as a ray) for a linear program where the CPLEX
simplex algorithm concludes that the LP is unbounded (solution status
CPX_STAT_UNBOUNDED
). An error is returned,
CPXERR_NOT_UNBOUNDED
, if this case does not hold.
As an illustration, consider a linear program of the form:
Minimize c'x Subject to Ax = b x ≥ 0
where ' indicates the transpose.
If the CPLEX simplex algorithm completes optimization with a
solution status of CPX_STAT_UNBOUNDED
, the vector z
returned by CPXgetray
would satisfy the following:
c'z < 0 Az = 0 z ≥ 0
if computations could be carried out in exact arithmetic.
Example
status = CPXgetray (env, lp, z);
env | A pointer to the CPLEX environment, as returned by |
lp | A pointer to the CPLEX LP problem object, as returned by |
z | The array where the unbounded direction is returned. This array must be at least as large as the number of columns in the problem object. |