Purpose
Writes the current solution to the binary
OMNI format
file
SOLFILE, as recorded in the solution file
problem_name
.sol. Optionally the current matrix may also be written. All information is appended to this file.
Synopsis
int XPRS_CC XPRSwriteomni(XPRSprob prob);
WRITEOMNI
Argument
prob
|
The current problem.
|
Related Controls
Integer
|
Whether to include matrix coefficients in OMNI output.
|
|
The binary solution file must be enabled.
|
String
|
Data for OMNI data name field.
|
Example 1 (Library)
XPRSreadprob(prob, "bob", "");
XPRSminim(prob, "");
XPRSsetintcontrol(prob, XPRS_OMNIFORMAT, 1);
XPRSwriteomni(prob);
XPRSreadprob(prob, "jo", "");
XPRSsetstrcontrol(prob, XPRS_OMNIDATANAME, "Jo");
XPRSminim(prob, "");
XPRSwriteomni(prob);
Will put two solutions on SOLFILE, the first taking the contents of the data name field
from the problem name in bob.mat, the second having its data name field "Jo".
Example 2 (Console)
An equivalent set of commands at the Console would be the following:
READPROB bob
MINIM
OMNIFORMAT = 1
WRITEOMNI
READPROB jo
OMNIDATANAME = "Jo"
MINIM
WRITEOMNI
Further information
1. To conform with OMNI standards the output is appended to the file called
SOLFILE. If this file already exists the output of
XPRSwriteomni
(
WRITEOMNI) will be appended to
SOLFILE, otherwise
SOLFILE is created in
the current working directory. The file is written in OMNI Standard Format, as defined in the
document "OMNI Standard Interface to Various Optimizers", available from
Haverly Systems. Note that the status codes generated are "
OPTM",
"
INFE", "
FEAS" and "
UNBD". Some early versions of the OMNI format
specification used other codes.
2. The
MHDR,
MROW and
MCOL data are only generated if
the control
OMNIFORMAT is set nonzero before the call to
XPRSwriteomni (
WRITEOMNI), for example:
READPROB
MINIM
WRITEBASIS
OMNIFORMAT = 1
WRITEOMNI
QUIT
3. The data name field in the OMNI format (bytes
8 to
15,
starting at
0) is filled from the control
OMNIDATANAME, which
should be set prior to a call of
XPRSwriteomni (
WRITEOMNI).
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.