NO FRAMES

CPXgetindconstrslack

public int CPXgetindconstrslack(CPXCENVptr env, CPXCLPptr lp, double * indslack, int begin, int end)
Definition file: cplex.h

The routine CPXgetindconstrslack is used to access the slack values for a range of indicator constraints. The beginning and end of the range must be specified. Note that an indicator constraint is considered inactive, and thus returns an infinite slack value, when the corresponding indicator binary takes a value less than the integrality tolerance (or greater than 1 minus the integrality tolerance if the indicator binary is complemented).

Example

 status = CPXgetindconstrslack (env, lp, indslack, 0, CPXgetnumindconstrs(env,lp)-1);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

indslack

An array to receive the slack values for each of the constraints. This array must be of length at least (end - begin + 1). If successful, indslack[0] through indslack[end-begin] contain the values of the slacks.

begin

An integer indicating the beginning of the range of slack values to be returned.

end

An integer indicating the end of the range of slack values to be returned.

Returns:

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