 |
 |
 |
 |
Purpose |
 |
 |
Change the sense of a single constraint.
|
 |
Synopsis |
 |
 |
int QSchange_sense (QSprob p, int rowindex, char sense)
|
 |
Arguments |
 |
p |
 |
a handle to an initialized problem. |
rowindex |
 |
the index of the constraint to be changed. |
sense |
 |
the new sense of the constraint; the value should be 'E' , 'L' , or 'G' . |
|
 |
Returns |
 |
 |
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
|
 |
Description |
 |
 |
The sense of each constraint in an LP problem is either ≥ , = , or ≤ . This function can be used to change the sense of a single constraint by specifying a new value using the encoding 'E' for ≥ , 'L' for = , and 'G' for ≤ .
|
 |
Example |
 |
 |
/* Assume p is initialized to the problem in the QSload_prob example. */
/* Change the second constraint to "<=". */
int rval;
rval = QSchange_sense (p, 1, 'L');
if (rval) {
fprintf (stderr,
"Could not change the sense, error code %d\n",rval);
}
|
 |
|
|