Description
The routine CPXwriteprob() is used to write the CPLEX LP problem object to a file in one of the following formats. These formats are described in detail in Appendix E, File Formats.
|
SAV
|
Binary matrix and basis file
|
|
MPS
|
MPS format
|
|
LP
|
CPLEX LP format
|
|
REW (or RMP)
|
MPS format, with all names changed to generic names
|
|
RLP
|
LP format, with all names changed to generic names
|
When this routine is invoked, the current problem is written to a file. If the file name ends with
.gz a compressed file will be written.Return Value
The routine returns a zero on success, and a nonzero if an error occurs.Synopsis
int CPXwriteprob (CPXENVptr env,
CPXLPptr lp,
char *filename,
char *filetype);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX routines.
CPXLPptr lpA pointer to a CPLEX LP problem object as returned by
CPXcreateprob().
char *filenameA character string containing the name of the file to which the problem should be written, unless otherwise specified with the
filetype argument. If the file name ends with .gz a compressed file will be written in accordance with the selected file type.
char *filetypeA character string containing the type of the file.
filetype is one of the following strings:
|
"SAV"
|
Binary SAV file
|
|
"MPS"
|
MPS format, original format
|
|
"LP"
|
CPLEX LP format, original format
|
|
"RMP"
|
MPS file, generic names
|
|
"REW"
|
MPS file, generic names
|
|
"RLP"
|
LP file, generic names
|
filetype may be NULL, in which case the type is inferred from the file name.
|
|
The string is not case sensitive. |
status = CPXwriteprob (env, lp, "myprob.sav", NULL);