NO FRAMES

CPXsolwrite

public int CPXsolwrite(CPXCENVptr env, CPXCLPptr lp, const char * filename_str)
Definition file: cplex.h

The routine CPXsolwrite is used to write a solution file for the selected CPLEX problem object. The routine can write files in SOL format, which is an XML format.

The XML format is documented in the stylesheet solution.xsl and schema solution.xsd in the include directory of the CPLEX distribution. ILOG CPLEX File Formats also documents this format briefly. Examples of its use appear in the examples distributed with the product and in the ILOG CPLEX User's Manual.

Example

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

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 solution should be written.

Returns:

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