XPRSloadpresolvebasis
XPRSloadpresolvebasis |
Purpose
Synopsis
int XPRS_CC XPRSloadpresolvebasis(XPRSprob prob, const int rstatus[], const int cstatus[]);
Arguments
prob
|
The current problem.
|
||||||||
rstatus
|
Integer array of length
ROWS containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:
|
||||||||
cstatus
|
Integer array of length
COLS containing the basis status of each of the columns in the matrix. The status must be one of:
|
Example
The following example saves the presolved basis for one problem, loading it into another:
int rows, cols, *rstatus, *cstatus; ... XPRSreadprob(prob,"myprob",""); XPRSmipoptimize(prob,"l"); XPRSgetintattrib(prob,XPRS_ROWS,&rows); XPRSgetintattrib(prob,XPRS_COLS,&cols); rstatus = malloc(rows*sizeof(int)); cstatus = malloc(cols*sizeof(int)); XPRSgetpresolvebasis(prob,rstatus,cstatus); XPRSreadprob(prob2,"myotherprob",""); XPRSmipoptimize(prob2,"l"); XPRSloadpresolvebasis(prob2,rstatus,cstatus);
Related topics