problem.loadbasis
problem.loadbasis |
Purpose
Loads a basis as specified by the user.
Synopsis
problem.loadbasis(rstatus, cstatus)
Arguments
rstatus
|
Array of length
problem.attributes.rows containing the basis status of the slack, surplus or artificial variable associated with each row. The status must be one of:
|
||||||||
cstatus
|
Array of length
problem.attributes.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:
p.read("problem", "") p.loadbasis(rstatus, cstatus) p.lpoptimize("")
Further information
If the problem has been altered since saving an advanced basis, one can 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