Overview | Group | Index | Concepts |
The routine CPXaddqconstr
adds a quadratic constraint
to a specified
CPLEX problem object. This routine may be called any time after a call to
CPXcreateprob
.
sense[i] | = 'L' | <= constraint |
sense[i] | = 'G' | >= constraint |
Example
status = CPXaddqconstr (env, lp, linnzcnt, quadnzcnt, rhsval, sense, linind, linval, quadrow, quadcol, quadval, NULL);
See also the example qcpex1.c
in the
ILOG CPLEX User's Manual and in the standard distribution.
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
linnzcnt | An integer that indicates the number of nonzero constraint coefficients in the linear part of the constraint. This specifies the length of the arrays |
quadnzcnt | An integer that indicates the number of nonzero constraint coefficients in the quadratic part of the constraint. This specifies the length of the arrays |
rhs | The righthand side term for the constraint to be added. |
sense | The sense of the constraint to be added. Note that quadratic constraints may only be less-than-or-equal-to or greater-than-or-equal-to constraints. See the discussion of QCP in the ILOG CPLEX User's Manual. |
linind | An array that with |
linval | An array that with |
quadrow | An array that with |
quadcol | An array that with |
quadval | An array that with |
lname_str | The name of the constraint to be added. May be NULL, in which case the new constraint is assigned a default name if the quadratic constraints already resident in the CPLEX problem object have names; otherwise, no name is associated with the constraint. |