QSopt QSget_bound QSopt > Callable Library > Function List
  QSopt
  Downloads
  LP Info
  Software
  Problem Formats
  Callable Library
  Overview
Function List
  Rational Solver
  Beta
  Contact Info
Purpose
Obtain a lower or upper bound for a variable.
Synopsis
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);
}
 
QSopt | Problem Formats | Downloads Back
Last Updated: November 2003