CPXchgrhs


Description

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

Return Value

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

Synopsis

  int CPXchgrhs (CPXCENVptr env,
                 CPXLPptr lp,
                 int cnt,
                 const int *indices,
                 const double *values);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

CPXLPptr lp

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

int 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.

const int *indices

An 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.

const double *values

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

Example

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


Previous Page: CPXchgqpcoef Return to Top Next Page: CPXchgrngval