NO FRAMES

CPXreadcopysol

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

The routine CPXreadcopysol reads a solution from a SOL file, and copies that basis or solution into a CPLEX problem object. The solution is used to initiate a crossover from a barrier solution, restart the simplex method with an advanced basis or specify variable values for a MIP start. CPX_PARAM_ADVIND must be set to 1 (one), its default value, or 2 (two) in order for the start to be used for starting a subsequent optimization. The file may contain basis status values, primal values, dual values, or a combination of those values.

Example

 status = CPXreadcopysol (env, lp, "myprob.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

The name of the file from which the solution information should be read.

Returns:

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