problem.writesol
problem.writesol |
Purpose
Writes the current solution to a CSV format ASCII file,
problem_name
.asc(and
.hdr).
Synopsis
problem.writesol(filename, flags)
Arguments
filename
|
A string of up to 200 characters containing the file name to which the solution is to be written. If omitted, the default
problem_name will be used. The extensions
.hdr and
.asc will be appended.
|
||||||||||||||||||||||||||||
flags
|
(optional) Flags to control which optional fields are output:
If no flags are specified, all fields are output.
Additional flags:
|
Example
In this example the basis status is output (along with the sequence number) following optimization:
p.read("prob1", "") p.lpoptimize("") p.writesol("", "sb")
Further information
1. The command produces two readable files:
filename.hdr (the solution header file) and
filename.asc (the CSV foramt solution file). The header file contains summary information, all in one line. The ASCII file contains one line of information for each row and column in the problem. Any fields appearing in the
.asc file will be in the order the flags are described above. The order that the flags are specified by the user is irrelevant.
2. Additionally, the mask control
OUTPUTMASK may be used to control which names are reported to the ASCII file. Only vectors whose names match
OUTPUTMASK are output.
OUTPUTMASK is set by default to "
????????", so that all vectors are output.
Related topics