CPXXgetray and CPXgetray

The routine CPXXgetray/CPXgetray finds an unbounded direction (also known as a ray) for a linear program where the CPLEX simplex optimizer concludes that the LP is unbounded (solution status CPX_STAT_UNBOUNDED).

int  CPXXgetray( CPXCENVptr env, CPXCLPptr lp, double * z )

int  CPXgetray( CPXCENVptr env, CPXCLPptr lp, double * z )

Description

Warning:

This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXXgetray/CPXgetray finds an unbounded direction (also known as a ray) for a linear program where the CPLEX simplex optimizer concludes that the LP is unbounded (solution status CPX_STAT_UNBOUNDED). An error is returned, CPXERR_NOT_UNBOUNDED, if this case does not hold.

The routine will return an error of CPXERR_BAD_METHOD if the algorithm used to obtain the unbounded status was not a simplex optimizer.

As an illustration, consider a linear program of the form:


Minimize c'x
Subject to Ax = b
x >= 0

where ' specifies the transpose.

If the CPLEX simplex algorithm completes optimization with a solution status of CPX_STAT_UNBOUNDED, the vector z returned by CPXXgetray/CPXgetray satisfies the following program (if computations could be carried out in exact arithmetic):


c'z < 0
Az = 0
z >= 0

Arguments

env
A pointer to the CPLEX environment, as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to the CPLEX LP problem object, as returned by CPXXcreateprob/CPXcreateprob.
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.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


status = CPXgetray (env, lp, z);