NO FRAMES

CPXcopymipstart

int CPXPUBLIC CPXcopymipstart(CPXCENVptr env, CPXLPptr lp, int cnt, const int * indices, const double * value)
Definition file: cplex.h
Include files: cplex.h

The routine CPXcopymipstart is used to copy MIP starting values to a CPLEX problem object of type CPXPROB_MILP, CPXPROB_MIQP, or CPXPROB_MIQCP.

Values must be specified for all integer and SOS member variables. Optionally, values may be specified for continuous variables. If the provided starting values are compatible with an integer feasible solution, that solution becomes the incumbent at the start of the optimizations. Otherwise, the starting values are ignored. The values for member variables of Special Ordered Sets are used to indicate which members of the set take on nonzero values.

The parameter CPX_PARAM_MIPSTART must be set to CPX_ON (1) for the values to be used. If it is set to zero, which is the default, the values are not used.

Example

 status = CPXcopymipstart (env, lp, cnt, indices, value);

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.

cnt

An integer giving the number of entries in the list.

indices

An array of length cnt containing the numeric indices of the columns corresponding to the variables which are assigned starting values.

value

An array of length cnt containing the values to be used for the starting integer solution. The entry value[j] is the value assigned to variable indices[j]. An entry value[j] greater than or equal to CPX_INFBOUND indicates no value is set for variable indices[j].

Example

 status = CPXcopymipstart (env, lp, cnt, indices, value);

Returns:

The routine returns zero on success and nonzero if an error occurs.