int QSget_bound (QSprob p, int colindex, char lu, double *bound)
Arguments
p
a handle to an initialized problem.
colindex
the index of the variable.
lu
an 'L' to obtain a lower bound or a 'U' to obtain an upper bound.
bound
returns the value of the specified lower or upper bound.
Returns
A zero value if the function terminated correctly, and a non-zero value if an error occurred.
Description
This function can be used to obtain the lower or upper bound on a single variable. If the bound on the specified variable does not exist, bound will be set to -QS_MAXDOUBLE in the case of lower bounds and set to QS_MAXDOUBLE in the case of upper bounds.
Example
/* p is an initialized QSprob, a handle to an existing LP problem */
int rval;
double bound;
rval = QSget_bound (p, 2, 'U', &bound);
if (rval) {
fprintf (stderr, "could not obtain bound, error code %d\n", rval);
} else {
printf ("Upper bound of variable 2 is %f\n", bound);
}