NO FRAMES

CPXgetprotected

int CPXPUBLIC CPXgetprotected(CPXCENVptr env, CPXCLPptr lp, int * cnt_p, int * indices, int pspace, int * surplus_p)
Definition file: cplex.h
Include files: cplex.h
Note

This is an advanced routine. Advanced routines typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXgetprotected is used to get the set of variables that cannot be aggregated out.

Note
If the value of pspace is 0, the negative of the value of *surplus_p returned indicates the length needed for array indices.

Example

 status = CPXgetprotected (env, lp, &protectcnt,
 	                         protectind, 10, &surplus);
 

Parameters:

env

A pointer to the CPLEX environment, as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX LP problem object, as returned by CPXcreateprob.

cnt_p

A pointer to an integer to contain the number of protected variables returned, that is, the true length of the array indices.

indices

The array to contain the indices of the protected variables.

pspace

An integer indicating the length of the array indices.

surplus_p

A pointer to an integer to contain the difference between pspace and the number of entries in indices. 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 that case, the routine CPXgetprotected returns the value CPXERR_NEGATIVE_SURPLUS, and the 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 array indices to hold the protected variable indices.