| Overview | Group | Tree | Graph | 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 right-hand 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 or greater than or equal 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 |