NO FRAMES

CPXchgqpcoef

public int CPXchgqpcoef(CPXCENVptr env, CPXLPptr lp, int i, int j, double newvalue)
Definition file: cplex.h

The routine CPXchgqpcoef changes the coefficient in the quadratic objective of a quadratic problem (QP) 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.

Example

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

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

i

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

j

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

newvalue

The new coefficient value.

Returns:

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