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.
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/CPXopenCPLEXroutine. - 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
grpindandgrptype. If the function returns either 0 (zero) orCPXERR_NEGATIVE_SURPLUSthen this value contains the number of elements that were stored ingrpindorgrptype. 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 ifgrpspaceis 0 (zero). - grpbeg
-
An array to contain indices specifying where each of the requested groups begins in the arrays
grptypeandgrpind. Specifically, group i consists of the entries ingrptypeandgrpindin the range fromgrpbeg[i-begin]togrpbeg[(i+1)-begin]-1. (Groupendconsists of the entries fromgrpbeg[end-begin]to*concnt_p-1.) This array must be of length at least (end-begin+1). May be NULL ifgrpspaceis 0 (zero). - grpind
-
An array to contain the indices of the entries for the constraints in each group. May be NULL if
grpspaceis 0 (zero). - grptype
-
An array to contain the constraint types for the constraints as they appear in groups. May be NULL if
grpspaceis 0 (zero). - grpspace
-
An integer specifying the length of the arrays
grpindandgrptype. May be 0 (zero). - surplus_p
-
A pointer to an integer to contain the difference between
grpspaceand the number of entries in each of the arraysgrpindandgrptype. A nonnegative value ofsurplus_pspecifies 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 routineCPXXgetconflictgroups/CPXgetconflictgroupsreturns the valueCPXERR_NEGATIVE_SURPLUS, and the negative value ofsurplus_pspecifies 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);