#### Method get_bounds_info

with prototype
```virtual bool get_bounds_info(Index n, Number* x_l, Number* x_u,
Index m, Number* g_l, Number* g_u)
```
Give IPOPT the value of the bounds on the variables and constraints.
• n: (in), the number of variables in the problem (dimension of ).
• x_l: (out) the lower bounds for .
• x_u: (out) the upper bounds for .
• m: (in), the number of constraints in the problem (dimension of ).
• g_l: (out) the lower bounds for .
• g_u: (out) the upper bounds for .
The values of n and m that you specified in get_nlp_info are passed to you for debug checking. Setting a lower bound to a value less than or equal to the value of the option nlp_lower_bound_inf will cause IPOPT to assume no lower bound. Likewise, specifying the upper bound above or equal to the value of the option nlp_upper_bound_inf will cause IPOPT to assume no upper bound. These options, nlp_lower_bound_inf and nlp_upper_bound_inf, are set to and , respectively, by default, but may be modified by changing the options (see Section 5).

In our example, the first constraint has a lower bound of and no upper bound, so we set the lower bound of constraint [0] to and the upper bound to some number greater than . The second constraint is an equality constraint and we set both bounds to . IPOPT recognizes this as an equality constraint and does not treat it as two inequalities.

```bool HS071_NLP::get_bounds_info(Index n, Number* x_l, Number* x_u,
Index m, Number* g_l, Number* g_u)
{
// here, the n and m we gave IPOPT in get_nlp_info are passed back to us.
// If desired, we could assert to make sure they are what we think they are.
assert(n == 4);
assert(m == 2);

// the variables have lower bounds of 1
for (Index i=0; i<4; i++) {
x_l[i] = 1.0;
}

// the variables have upper bounds of 5
for (Index i=0; i<4; i++) {
x_u[i] = 5.0;
}

// the first constraint g1 has a lower bound of 25
g_l[0] = 25;
// the first constraint g1 has NO upper bound, here we set it to 2e19.
// Ipopt interprets any number greater than nlp_upper_bound_inf as
// infinity. The default value of nlp_upper_bound_inf and nlp_lower_bound_inf
// is 1e19 and can be changed through ipopt options.
g_u[0] = 2e19;

// the second constraint g2 is an equality constraint, so we set the
// upper and lower bound to the same value
g_l[1] = g_u[1] = 40.0;

return true;
}
```

Andreas Waechter 2010-12-22