Overview | Group | Index | Concepts |
The routine CPXgetbase
is used to get the basis resident
in a CPLEX problem object. Either of the arguments cstat
or
rstat
may be NULL if only one set of status values is needed.
CPX_AT_LOWER | 0 | variable at lower bound |
CPX_BASIC | 1 | variable is basic |
CPX_AT_UPPER | 2 | variable at upper bound |
CPX_FREE_SUPER | 3 | variable free and nonbasic |
CPX_AT_LOWER | 0 | associated slack, surplus, or artificial variable is nonbasic at value 0.0 (zero) |
CPX_BASIC | 1 | associated slack, surplus, or artificial variable is basic |
CPX_AT_LOWER | 0 | associated slack, surplus, or artificial variable is nonbasic at its lower bound |
CPX_BASIC | 1 | associated slack, surplus, or artificial variable is basic |
CPX_AT_UPPER | 2 | associated slack, surplus, or artificial variable is nonbasic at upper bound |
Example
status = CPXgetbase (env, lp, cstat, rstat);
See also the example lpex2.c
in the
examples distributed with the product.
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
cstat | An array to receive the basis status of the columns in the CPLEX problem object. The length of the array must be no less than the number of columns in the matrix. The array element |
rstat | An array to receive the basis status of the artificial, slack, or surplus variable associated with each row in the constraint matrix. The length of the array must be no less than the number of rows in the CPLEX problem object. For rows other than ranged rows, the array element |
The routine returns zero if a basis exists. It returns nonzero if no solution exists or any other type of error occurs.