Description
The routine CPXchgsense() is used to change the sense of a set of constraints of an LP problem object. When changing the sense of a row to ranged, CPXchgsense() sets the corresponding range value to 0. The CPXchgcoef() routine can then be used to change the range value.Return Value
The routine returns a zero on success, and a nonzero if an error occurs.Synopsis
int CPXchgsense (CPXENVptr env,
CPXLPptr lp,
int cnt,
int *indices,
char *sense);
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 constraints to be changed.
cnt thus represents the length of the arrays indices and sense.
int *indicesAn array of length
cnt containing the numerical indices of the rows corresponding to the constraints which are to have their senses changed. Note that row i of the constraint matrix has the internal index i-1.
char *senseAn array of length
cnt containing characters that indicate the new sense of the constraints present in indices.
sense[i]
|
= 'L'
|
The new sense is |
sense[i]
|
= 'E'
|
The new sense is =
|
sense[i]
|
= 'G'
|
The new sense is |
sense[i]
|
= 'R'
|
The constraint will be ranged
|
status = CPXchgsense (env, lp, cnt, indices, sense);