XPRSloadbasis
XPRSloadbasis |
Purpose
Synopsis
int 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:
|
||||||||
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:
|
Example
This 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); XPRSlpoptimize(prob,"");
Further information
If 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