NO FRAMES

CPXcopymipstart

public int CPXcopymipstart(CPXCENVptr env, CPXLPptr lp, int cnt, const int * indices, const double * values)
Definition file: cplex.h

The routine CPXcopymipstart copies MIP start values to a CPLEX problem object of type CPXPROB_MILP, CPXPROB_MIQP, or CPXPROB_MIQCP.

MIP start values may be specified for any subset of the integer or continuous variables in the problem. When optimization begins or resumes, CPLEX attempts to find a feasible MIP solution that is compatible with the set of values specified in the MIP start. When a partial MIP start is provided, CPLEX tries to extend it to a complete solution by solving a MIP over the variables whose values are not specified in the MIP start. The parameter CPX_PARAM_SUBMIPNODELIM controls the amount of effort CPLEX expends in trying to solve this secondary MIP. If CPLEX is able to find a complete feasible solution, that solution becomes the incumbent. If the specified MIP start values are infeasible, these values are retained for use in a subsequent repair heuristic. See the description of the parameter CPX_PARAM_REPAIRTRIES for more information about this repair heuristic.

This routine replaces any existing MIP start information in the problem. Use the routine CPXchgmipstart to modify or extend an existing MIP start.

Example

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

The parameter CPX_PARAM_ADVIND must be set to 1 (one), its default value, or 2 (two) in order for the MIP start to be used.

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.

values

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

Returns:

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