XPRSgetbasis
XPRSgetbasis |
Purpose
Returns the current basis into the user's data arrays.
Synopsis
int XPRS_CC XPRSgetbasis(XPRSprob prob, int rstatus[], int cstatus[]);
Arguments
prob
|
The current problem.
|
||||||||
rstatus
|
Integer array of length
ROWS to the basis status of the slack, surplus or artificial variable associated with each row. The status will be one of:
May be
NULL if not required.
|
||||||||
cstatus
|
Integer array of length
COLS to hold the basis status of the columns in the constraint matrix. The status will be one of:
May be
NULL if not required.
|
Example
The following example minimizes a problem before saving the basis for later:
int rows, cols, *rstatus, *cstatus; ... XPRSgetintattrib(prob,XPRS_ROWS,&rows); XPRSgetintattrib(prob,XPRS_COLS,&cols); rstatus = (int *) malloc(sizeof(int)*rows); cstatus = (int *) malloc(sizeof(int)*cols); XPRSlpoptimize(prob,""); XPRSgetbasis(prob,rstatus,cstatus);
Related topics