XPRSwritebasis

WRITEBASIS


Purpose
Writes the current basis to a file for later input into the Optimizer.
Synopsis
int XPRS_CC XPRSwritebasis(XPRSprob prob, const char *filename, const char *flags);
WRITEBASIS [-flags] [filename]
Arguments
prob 
The current problem.
filename 
A string of up to 200 characters containing the file name from which the basis is to be written. If omitted, the default problem_name is used with a .bss extension.
flags 
Flags to pass to XPRSwritebasis (WRITEBASIS):
output the internal presolved basis.
output a compact advanced form of the basis.
Example 1 (Library)
After an LP has been solved it may be desirable to save the basis for future input as an advanced starting point for other similar problems. This may save significant amounts of time if the LP is complex. The Optimizer input commands might then be:
XPRSreadprob(prob, "myprob", "");
XPRSmaxim(prob, "");
XPRSwritebasis(prob, "", "");
XPRSglobal(prob);
This reads in a matrix file, maximizes the LP, saves the basis and performs a global search. Saving an IP basis is generally not very useful, so in the above example only the LP basis is saved.
Example 2 (Console)
An equivalent set of commands to the above for console users would be:
READPROB
MAXIM
WRITEBASIS
GLOBAL
Further information
1. The c flag is only useful for later input to a similar problem using the t flag with XPRSreadbasis (READBASIS).
2. If the Newton barrier algorithm has been used for optimization then crossover must have been performed before there is a valid basis. This basis can then only be used for restarting the simplex (primal or dual) algorithm.
3. XPRSwritebasis (WRITEBASIS) will output the basis for the original problem even if the matrix has been presolved.
Related topics
XPRSgetbasis, XPRSreadbasis (READBASIS).


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.