NO FRAMES

CPXwriteprob

int CPXPUBLIC CPXwriteprob(CPXCENVptr env, CPXCLPptr lp, const char * filename_str, const char * filetype_str)
Definition file: cplex.h
Include files: cplex.h

The routine CPXwriteprob is used to write the CPLEX problem object to a file in one of the formats in the table. These formats are documented in the reference manual ILOG CPLEX File Formats and examples of their use appear in the ILOG CPLEX User's Manual.

File formats
SAVBinary matrix and basis file
MPSMPS format
LPCPLEX LP format
REWMPS format, with all names changed to generic names
RMPMPS format, with all names changed to generic names
RLPLP 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 is written.

Example

 status = CPXwriteprob (env, lp, "myprob.sav", NULL);
 

See also the example lpex1.c in the ILOG CPLEX User's Manual and in the standard distribution.

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

filename_str

A character string containing the name of the file to which the problem is to be written, unless otherwise specified with the filetype argument. If the file name ends with .gz, a compressed file is written in accordance with the selected file type.

filetype_str

A character string containing the type of the file, which can be one of the values in the table. May be NULL, in which case the type is inferred from the file name. The string is not case sensitive.

Returns:

The routine returns zero on success and nonzero if an error occurs.