CPXchgqpcoef


Description

The routine CPXchgqpcoef() changes the coefficient in the Q matrix of a quadratic problem corresponding to the variable pair (i,j) to the value newvalue. If i is not equal to j, both Q(i,j) and Q(j,i) are changed to newvalue.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

  int CPXchgqpcoef (CPXCENVptr env,
                    CPXLPptr lp,
                    int i,
                    int j,
                    double newvalue);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

CPXLPptr lp

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

int i

An integer that indicates the first variable number (row number in Q).

int j

An integer that indicates the second variable number (column number in Q).

double newvalue

The new coefficient value.

Example

  status = CPXchgqpcoef (env, lp, 10, 12, 82.5);


Previous Page: CPXchgprobtype Return to Top Next Page: CPXchgrhs