Description
The routine CPXchgrhs() is used to change the right-hand side coefficients of a set of constraints in the LP problem object.Return Value
The routine returns a zero on success, and a nonzero if an error occurs.Synopsis
int CPXchgrhs (CPXENVptr env,
CPXLPptr lp,
int cnt,
int *indices,
double *values);
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 cntAn integer that indicates the total number of right-hand side coefficients to be changed.
cnt thus specifies the length of the arrays indices and values.
int *indicesAn array of length
cnt containing the numerical indices of the rows corresponding to the constraints for which right-hand side coefficients are to be changed. Note that row i of the constraint matrix has the internal index i-1.
double *valuesAn array of length
cnt containing the new values of the right-hand side coefficients of the constraints present in indices.
status = CPXchgrhs (env, lp, cnt, indices, values);