Initializing help system before first use

problem.writebasis

problem.writebasis


Purpose
Writes the current basis to a file for later input into the Optimizer.
Synopsis
problem.writebasis (filename, flags)
Arguments
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 
(optional) Flags to pass to writebasis:
output the internal presolved basis.
output a compact advanced form of the basis.
output basis file containing current solution values.
output values in single precision.
output values in hexadecimal format.
obsolete flag (now default behavior).
Example
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:
p.read ("myprob", "")
p.lpoptimize ("")
p.writebasis ("", "")
This reads in a problem file, maximizes the LP and saves the basis. Loading a basis for a MIP problem can disable some MIP presolve operations which can result in a large increase in solution times so it is generally not recommended.
Further information
1. The t flag is only useful for later input to a similar problem using the t flag with problem.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. writebasis will output the basis for the original problem even if the problem has been presolved.
Related topics