XPRSloadpresolvebasis
PurposeSynopsisint 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:
0 slack, surplus or artificial is non-basic at lower bound; 1 slack, surplus or artificial is basic; 2 slack or surplus is non-basic at upper bound. cstatus Integer array of length COLS containing the basis status of each of the columns in the matrix. The status must be one of:
0 variable is non-basic at lower bound or superbasic at zero if the variable has no lower bound; 1 variable is basic; 2 variable is at upper bound; 3 variable is super-basic.ExampleThe following example saves the presolved basis for one problem, loading it into another:int rows, cols, *rstatus, *cstatus; ... XPRSreadprob(prob,"myprob",""); XPRSminim(prob,""); 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",""); XPRSminim(prob2,""); XPRSloadpresolvebasis(prob2,rstatus,cstatus);Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.