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);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX routines.
CPXLPptr lpA pointer to a CPLEX LP problem object as returned by
CPXcreateprob().
int numcoefsThe number of coefficients to change, or, equivalently, the length of the arrays
rowlist, collist, and vallist.
int *rowlist int *collist double *vallistThe 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].
status = CPXchgcoeflist (env, lp, numcoefs, rowlist, collist,
vallist);