Writes solution information from the solution pool in SOL format to the file specified by name.

Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0

Syntax

C#
public virtual void WriteSolution(
	string name,
	int soln
)
Visual Basic
Public Overridable Sub WriteSolution ( _
	name As String, _
	soln As Integer _
)

Parameters

name
Type: System..::..String
The name of the file to write.
soln
Type: System..::..Int32
The index of the solution pool member for which to write solution values. A value of Cplex.IncumbentId specifies that the values written should correspond to the incumbent rather than a member of the solution pool.

Remarks

A SOL file can later be read back into CPLEX with the method Cplex.ReadStartInfo. By convention, the file extension is .Sol. The SOL file format is documented in the CPLEX File Formats Reference Manual and in the stylesheet solution.Xsl and in the schema solution.Xsd in the include directory of the product. Samples of its use appear in the examples distributed with the product and in the CPLEX User's Manual.

See Also