Previous Page: CPXchgcoefFirst PageNext Page: CPXchgcolname

CPXchgcoeflist


Description

The routine CPXchgcoeflist() is used to change a list of matrix coefficients of an LP 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 that the corresponding rows and columns must already exist in the LP problem object, and that this routine cannot be used to change objective, right-hand side, range, or bound coefficients. Note also that duplicate entries, i.e. two triplets with identical i and j, are not allowed.

Return Value

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

Synopsis

int CPXchgcoeflist (CPXENVptr env,
                    CPXLPptr lp,
                    int numcoefs,
                    int *rowlist,
                    int *collist,
                    double *vallist);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

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

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

int *rowlist
int *collist
double *vallist
The three arrays rowlist, collist, and vallist, each of length numcoefs, describe the list of 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].

Example

status = CPXchgcoeflist (env, lp, numcoefs, rowlist, collist,
                         vallist);
Previous Page: CPXchgcoefFirst PageNext Page: CPXchgcolname