Initializing help system before first use

XPRSgetpresolvebasis

XPRSgetpresolvebasis


Purpose
Returns the current basis from memory into the user's data areas. If the problem is presolved, the presolved basis will be returned. Otherwise the original basis will be returned.
Synopsis
int XPRS_CC XPRSgetpresolvebasis(XPRSprob prob, int rstatus[], int cstatus[]);
Arguments
prob 
The current problem.
rstatus 
Integer array of length ROWS to the basis status of the stack, surplus or artificial variable associated with each row. The status will be one of:
slack, surplus or artificial is non-basic at lower bound;
slack, surplus or artificial is basic;
slack or surplus is non-basic at upper bound.
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:
variable is non-basic at lower bound, or superbasic at zero if the variable has no lower bound;
variable is basic;
variable is at upper bound;
variable is super-basic.
May be NULL if not required.
Example
The following obtains and outputs basis information on a presolved problem prior to the global search:
XPRSprob prob;
int i, cols, *cstatus;
...
XPRSreadprob(prob,"myglobalprob","");
XPRSmipoptimize(prob,"l");
XPRSgetintattrib(prob,XPRS_COLS,&cols);
cstatus = malloc(cols*sizeof(int));
XPRSgetpresolvebasis(prob,NULL,cstatus);
for(i=0;i<cols;i++)
 printf("Column %d: %d\n", i, cstatus[i]);
XPRSmipoptimize(prob);
Related topics