 |
/* p is an initialized QSprob, a handle to an existing LP problem */
/* Find the index of the constraint r1. */
int rval, rowindex;
const char *name = "r1";
rval = QSget_row_index (p, name, &rowindex);
if (rval) {
fprintf (stderr, "could not get index, error code %d\n", rval);
} else {
if (rowindex == -1) {
printf ("%s is not in the problem\n", name);
} else {
printf ("%s is row number %d\n", name, rowindex);
}
}
|