CPXXgetconflictgroups and CPXgetconflictgroups

The routine CPXXgetconflictgroups/CPXgetconflictgroups accesses the constraint group information given in the last call to the routine CPXXrefineconflictext/CPXrefineconflictext.

int  CPXXgetconflictgroups( CPXCENVptr env, CPXCLPptr lp, CPXNNZ * concnt_p, double * grppref, CPXNNZ * grpbeg, CPXDIM * grpind, char * grptype, CPXNNZ grpspace, CPXNNZ * surplus_p, CPXDIM begin, CPXDIM end )

int  CPXgetconflictgroups( CPXCENVptr env, CPXCLPptr lp, int * concnt_p, double * grppref, int * grpbeg, int * grpind, char * grptype, int grpspace, int * surplus_p, int begin, int end )

Description

The routine CPXXgetconflictgroups/CPXgetconflictgroups accesses the constraint group information from the last call to the routine CPXXrefineconflictext/CPXrefineconflictext. The beginning and end of the range, along with the length of the arrays in which the entries of these rows are to be returned, must be specified.

Note: If the value of grpspace is 0 then the negative of the value of surplus_p returned specifies the length needed for the arrays grptype and grpind.

Arguments

env
A pointer to the CPLEX environment as returned by the CPXXopenCPLEX/CPXopenCPLEX routine.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
concnt_p
A pointer to an integer to contain the number of constraints returned; that is, the true length of the arrays grpind and grptype. If the function returns either 0 (zero) or CPXERR_NEGATIVE_SURPLUS then this value contains the number of elements that were stored in grpind or grptype. Otherwise, the value is either unchanged or set to 0 (zero).
grppref
An array to contain the preferences of the requested groups. This array must be of length at least (end-begin+1). May be NULL if grpspace is 0 (zero).
grpbeg
An array to contain indices specifying where each of the requested groups begins in the arrays grptype and grpind. Specifically, group i consists of the entries in grptype and grpind in the range from grpbeg[i-begin] to grpbeg[(i+1) -begin]-1. (Group end consists of the entries from grpbeg[end-begin] to *concnt_p -1.) This array must be of length at least (end-begin+1). May be NULL if grpspace is 0 (zero).
grpind
An array to contain the indices of the entries for the constraints in each group. May be NULL if grpspace is 0 (zero).
grptype
An array to contain the constraint types for the constraints as they appear in groups. May be NULL if grpspace is 0 (zero).
grpspace
An integer specifying the length of the arrays grpind and grptype. May be 0 (zero).
surplus_p
A pointer to an integer to contain the difference between grpspace and the number of entries in each of the arrays grpind and grptype. A nonnegative value of surplus_p specifies that the length of the arrays was sufficient. A negative value specifies that the length was insufficient and that the routine could not complete its task. In this case, the routine CPXXgetconflictgroups/CPXgetconflictgroups returns the value CPXERR_NEGATIVE_SURPLUS, and the negative value of surplus_p specifies the amount of insufficient space in the arrays.
begin
An integer specifying the beginning of the range of groups to be returned.
end
An integer specifying the end of the range of groups to be returned.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs. The value CPXERR_NEGATIVE_SURPLUS specifies that insufficient space was available in the arrays grpind and grptype to hold the constraint information.

Example


status = CPXgetconflictgroups (env, lp, &concnt,
         grppref, grpbeg, grpind, grptype,
	      grpspace, &surplus, 0, cur_numgroups-1);