Initializing help system before first use

problem.write

problem.write


Purpose
Writes the current problem to an MPS or LP file.
Synopsis
problem.write (filename, flags)
Arguments
filename 
A string of up to 200 characters to contain the file name to which the problem is to be written. If omitted, the default problem_name is used with a .mps extension, unless the l flag is used in which case the extension is .lp.
flags 
(optional) Flags, which can be one or more of the following:
single precision of numerical values;
one element per line;
scaled;
scrambled vector names;
output in LP format;
output MPS file in hexadecimal format.
obsolete flag (now default behavior).
Example
The following example outputs the current problem in full precision, LP format with scrambled vector names to the file problem_name .lp.
p.write ("", "lps")
Further information
1. If problem.loadproblem is used to obtain a problem then there is no association between the objective function and the N rows in the problem and so a separate N row (called __OBJ___) is created upon a write. Also, if after a call to read either the objective row or the N row in the problem corresponding to the objective row are changed, the association between the two is lost and the __OBJ___ row is created with an write. To remove the objective row from the problem when doing a read, set keepnrows to -1 before read.
2. The hexadecimal format is useful for saving the exact internal precision of the problem.
3. Warning: If problem.read is used to input a problem, then the input file will be overwritten by write if a new filename is not specified.
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.