Purpose
Load a previously saved basis.
Synopsis
int XPRBloadbasis(XPRBbasis basis);
Argument
basis
|
Reference to a previously saved basis.
|
Return value
0 if function executed successfully, 1 otherwise.
Example
The following code saves the current basis prior to some matrix changes, before subsequently reloading the saved basis to
solve the linear relaxation.
XPRBprob expl2;
XPRBbasis basis;
...
expl2 = XPRBnewprob("example2");
XPRBsolve(expl2, "l");
basis = XPRBsavebasis(expl2);
...
XPRBloadmat(expl2);
XPRBloadbasis(basis);
XPRBdelbasis(basis);
XPRBsolve(expl2, "l");
Further information
This function loads a basis for the current problem. The basis must have been saved using function
XPRBsavebasis. It is
not possible to load a basis saved for any other problem than the current one, even if the problems are similar. This function
takes into account that the problem may have been modified (addition/deletion of variables and constraints) since the basis
has been stored. For reading a basis from a file, the Optimizer library function
XPRSreadbasis may be used. Note that the problem has to be loaded explicitly (function
XPRBloadmat) before the basis is re-input with
XPRBloadbasis. Furthermore, if the reference to a basis is not used any more it should be deleted using function
XPRBdelbasis.
Related topics
XPRBdelbasis,
XPRBsavebasis,
XPRSreadbasis (see Optimizer Reference Manual),
XPRSwritebasis (see Optimizer Reference Manual).
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.