Purpose
Write the current problem to a file in extended MPS or text format
Synopsis
int XPRS_CC XSLPwriteprob(XSLPprob Prob, char *Filename, char *Flags);
Arguments
|
Prob
|
The current SLP problem.
|
|
Filename
|
Character string holding the name of the file to receive the output.
The extension ".mat" will automatically be appended to the file name, except for "text"
format when ".txt" will be appended.
|
|
Flags
|
The following flags can be used:
|
l
|
(lower-case "L") write the linearized matrix (the default is to write
the non-linear matrix including formulae);
|
|
o
|
one coefficient per line (the default is up to two numbers or one
formula per line);
|
|
s
|
"scrambled" names (the default is to use the names provided on input);
|
|
t
|
write the matrix in "text" (the default is to write extended MPS format).
|
|
Example
The following example reads a problem from file, augments it and writes
the augmented (linearized) matrix in text form to file "output.txt":
XSLPreadprob(Prob, "Matrix", "");
XSLPconstruct(Prob);
XSLPwriteprob(Prob, "output", "lt");
Further information
The t flag is used to produce a "human-readable" form of the
problem. It is similar to the lp format of XPRSwriteprob, but does not
contain all the potential complexities of the Extended MPS Format, so the resulting file
cannot be used for input. A quadratic objective is written with its true coefficients (not
scaled by 2 as in the equivalent lp format).
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.