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:
i
|
output the internal presolved basis.
|
t
|
output a compact advanced form of the basis.
|
n
|
output basis file containing current solution values.
|
h
|
output values in single precision.
|
x
|
output values in hexadecimal format.
|
p
|
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
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the
property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not
convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except
solely for internal evaluation purposes to determine whether to purchase a license to the software
described in this documentation, or as otherwise set forth in a written software license agreement
between you and FICO (or a FICO affiliate). Use of this documentation and the software described in
it must conform strictly to the foregoing permitted uses, and no other use is permitted.