NO FRAMES

CPXchgrhs

int CPXPUBLIC CPXchgrhs(CPXCENVptr env, CPXLPptr lp, int cnt, const int * indices, const double * values)
Definition file: cplex.h
Include files: cplex.h

The routine CPXchgrhs is used to change the right-hand side coefficients of a set of linear constraints in the CPLEX problem object.

Example

 status = CPXchgrhs (env, lp, cnt, indices, values);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

cnt

An integer that indicates the total number of right-hand side coefficients to be changed, and thus specifies the length of the arrays indices and values.

indices

An array of length cnt containing the numeric indices of the rows corresponding to the linear constraints for which right-hand side coefficients are to be changed.

values

An array of length cnt containing the new values of the right-hand side coefficients of the linear constraints present in indices.

Returns:

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