NO FRAMES

CPXgetmipstart

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

The routine CPXgetmipstart accesses MIP start information stored in a CPLEX problem object. Values are returned for all integer, binary, semi-continuous, and nonzero SOS variables.

Note
If the value of mipstartspace 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 mipstartspace.

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 mipstartspace.

mipstartspace

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

surplus_p

A pointer to an integer to contain the difference between mipstartspace 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. The error CPXERR_NO_MIPSTART indicates that no start information is available.

Returns:

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