Previous Page: CPXwriteprob First PageNext Page: Interactive Base System Commands

CPXwritesol


Description

The routine CPXwritesol() is used to write a solution file for the selected CPLEX LP problem object. The routine can write files in:

The ASCII and binary formats are described in detail in Appendix E, File Formats.

Return Value

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

Synopsis

int CPXwritesol (CPXENVptr env,
                 CPXLPptr lp,
                 char *filename,
                 char *filetype);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

char *filename
A character string containing the name of the file to which the solution should be written.

char *filetype
A character string containing the type of the file. filetype is one of the following strings:

"TXT"  
ASCII solution file  
"BIN"  
Binary solution file  

filetype may be NULL, in which case the type is inferred from the characters following the last period in the filename. Note that the string is not case sensitive.

Example

status = CPXwritesol (env, lp, "myfile.txt", NULL);

Previous Page: CPXwriteprob First PageNext Page: Interactive Base System Commands