NO FRAMES

CPXchgsense

int CPXPUBLIC CPXchgsense(CPXCENVptr env, CPXLPptr lp, int cnt, const int * indices, const char * sense)
Definition file: cplex.h
Include files: cplex.h

The routine CPXchgsense is used to change the sense of a set of linear constraints of a CPLEX problem object. When changing the sense of a row to ranged, CPXchgsense sets the corresponding range value to 0 (zero). The routine CPXchgrngval can then be used to change the range value.

Example

 status = CPXchgsense (env, lp, cnt, indices, sense);
Values of sense
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 is ranged

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 linear constraints to be changed, and thus represents the length of the arrays indices and sense.

indices

An array of length cnt containing the numeric indices of the rows corresponding to the linear constraints which are to have their senses changed.

sense

An array of length cnt containing characters that indicate the new sense of the linear constraints specified in indices. Possible values appear in the table.

Returns:

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