XPRSloadbasis
PurposeSynopsisint XPRS_CC XPRSloadbasis(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. 3 slack or surplus is super-basic. cstatus Integer array of length COLS containing the basis status of each of the columns in the constraint 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.ExampleThis example loads a problem and then reloads a (previously optimized) basis from a similar problem to speed up the optimization:XPRSreadprob(prob,"problem",""); XPRSloadbasis(prob,rstatus,cstatus); XPRSminim(prob,"");Further informationIf the problem has been altered since saving an advanced basis, you may want to alter the basis as follows before loading it:
- Make new variables non-basic at their lower bound (cstatus[icol]=0), unless a variable has an infinite lower bound and a finite upper bound, in which case make the variable non-basic at its upper bound (cstatus[icol]=2);
- Make new constraints basic (rstatus[jrow]=1);
- Try not to delete basic variables, or non-basic constraints.
Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.