CPXXsolwrite and CPXsolwrite

The routine CPXXsolwrite/CPXsolwrite writes a solution file for the selected CPLEX problem object.

int  CPXXsolwrite( CPXCENVptr env, CPXCLPptr lp, char const * filename_str )

int  CPXsolwrite( CPXCENVptr env, CPXCLPptr lp, char const * filename_str )

Description

The routine CPXXsolwrite/CPXsolwrite writes a solution file for the selected CPLEX problem object to a file in SOL format. The level of detail written into a SOL file can be controlled using the parameter write level for MST, SOL files (CPX_PARAM_WRITELEVEL).

The SOL format is an XML format and is documented in the stylesheet solution.xsl and schema solution.xsd in the include directory of the CPLEX distribution. CPLEX File Formats Reference Manual also documents this format briefly.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
filename_str
A character string containing the name of the file to which the solution should be written.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

See also

Example


status = CPXsolwrite (env, lp, "myfile.sol");