NO FRAMES

CPXchgcoeflist

int CPXPUBLIC CPXchgcoeflist(CPXCENVptr env, CPXLPptr lp, int numcoefs, const int * rowlist, const int * collist, const double * vallist)
Definition file: cplex.h
Include files: cplex.h

The routine CPXchgcoeflist is used to change a list of matrix coefficients of a CPLEX problem object. The list is prepared as a set of triples (i, j, value), where i is the row index, j is the column index, and value is the new value. The list may be in any order.

Note

The corresponding rows and columns must already exist in the CPLEX problem object.

This routine cannot be used to change objective, right-hand side, range, or bound coefficients.

Duplicate entries, that is, two triplets with identical i and j, are not allowed.

Example

 status = CPXchgcoeflist (env, lp, numcoefs, rowlist, collist, vallist);
 

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

numcoefs

The number of coefficients to change, or, equivalently, the length of the arrays rowlist, collist, and vallist.

rowlist

An array of length numcoefs that with collist and vallist indicates the coefficients to change.

collist

An array of length numcoefs that with rowlist and vallist indicates the coefficients to change.

vallist

An array of length numcoefs that with rowlist and collist indicates the coefficients to change. The entries rowlist[k], collist[k], and vallist[k] indicate that the matrix coefficient in row rowlist[k] and column collist[k] should be changed to the value vallist[k].

Returns:

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