Description
The routine CPXwritesol() is used to write a solution file for the selected CPLEX LP problem object. The routine can write files in:
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);
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 solution should be written.
char *filetypeA 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);