NO FRAMES

CPXchgcoeflist

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

The routine CPXchgcoeflist changes 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, righthand side, range, or bound coefficients.

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

When you build or modify your problem with this routine, you can verify that the results are as you intended by calling CPXcheckchgcoeflist during application development.

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 specifies the coefficients to change.

collist

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

vallist

An array of length numcoefs that with rowlist and collist specifies the coefficients to change. The entries rowlist[k], collist[k], and vallist[k] specify 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 if successful and nonzero if an error occurs.