NO FRAMES

CPXsolwritesolnpool

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

The routine CPXsolwrite writes a solution file, using either the incumbent solution or a solution from the solution pool, for the selected CPLEX problem object. The routine writes files in SOL format, which is an XML format.

The SOL 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.

Example

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

See Also:

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

soln

An integer specifying the index of the solution pool member which should be written. A value of -1 specifies that the incumbent solution should be used instead of a solution pool member.

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.