Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXchgcoef
is used to change a single
coefficient in the constraint matrix, linear objective coefficients,
right-hand
side or ranges of a CPLEX problem object. The coefficient is specified using
its coordinates in the constraint matrix. When changing matrix coefficients
from zero to nonzero values, be sure that the corresponding row and column
indices exist in the problem, so that -1
≤ i <
CPXgetnumrows(env,lp)
and -2
≤ j
<
CPXgetnumcols(env,lp)
Example
status = CPXchgcoef (env, lp, 10, 15, 23.2);
See Also:
CPXchgobj, CPXchgrhs, CPXchgrngval
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
i | An integer that indicates the numeric index of the row in which the coefficient is located. The linear objective row is referenced with |
j | An integer that indicates the numeric index of the column in which the coefficient is located. The RHS column is referenced with |
newvalue | The new value for the coefficient being changed. |