NO FRAMES

CPXgetmipstart

int CPXPUBLIC CPXgetmipstart(CPXCENVptr env, CPXCLPptr lp, int * cnt_p, int * indices, double * value, int mipstartspace, int * surplus_p)
Definition file: cplex.h
Include files: cplex.h

The routine CPXgetmipstart is used to access MIP start information stored in a CPLEX problem object. Values are returned for all integer, binary, semi-continuous, and nonzero SOS variables when the MIP start is the result of a call to CPXmipopt.

Note
If the value of startspace is 0 (zero), then the negative of the value of *surplus_p returned indicates the length needed for the arrays indices and values.

Example

 status = CPXgetmipstart (env, lp, &listsize, indices, values,
                          numcols, &surplus);

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_p

A pointer to an integer to contain the number of MIP start entries returned; that is, the true length of the arrays indices and values.

indices

An array to contain the indices of the variables in the MIP start. indices[k] is the index of the variable which is entry k in the MIP start information. Must be of length no less than startspace.

value

An array to contain the MIP start values. The start value corresponding to indices[k] is returned in values[k]. Must be of length at least startspace.

mipstartspace

An integer indicating the length of the non-NULL array indices and values; startspace may be 0 (zero).

surplus_p

A pointer to an integer to contain the difference between startspace and the number of entries in each of the arrays indices, and values. A nonnegative value of *surplus_p indicates that the length of the arrays was sufficient. A negative value indicates that the length was insufficient and that the routine could not complete its task. In this case, the routine CPXgetmipstart returns the value CPXERR_NEGATIVE_SURPLUS, and the negative value of *surplus_p indicates the amount of insufficient space in the arrays.

Returns:

The routine returns zero on success and nonzero if an error occurs. The value CPXERR_NEGATIVE_SURPLUS indicates that insufficient space was available in the indices and values arrays to hold the MIP start information.