Hi,

Can `JuMP`

report that an objective function has reached some predefined limit?

My problem looks the following. I am looking for a `Min`

or `Max`

value of a variable `x[1]`

within the bounds (lets say `[1e-9,1e9]`

) w.r.t some non-linear constraint `f(x)<=alpha`

:

```
m=Model(optimizer_with_attributes(Ipopt.Optimizer, "max_cpu_time" => 60.0))
@variable(m, x[j=1:n], start=init_x[j])
JuMP.register(m, :f, n, f, autodiff=true)
@objective(m, Min, x[1])
@NLconstraint(m, f(x...) <= alpha)
```

To set the bounds I either need to define variables limits:

```
@variable(m, 1e-9<=x[j=1:n]<=1e9, start=init_x[j])
```

Or to add constraints:

```
@constraint(m, con1, 1e-9 <= x[1] <= 1e9)
```

However reaching the bound (`1e-9`

or `1e9`

) may result in the following `JuMP.termination_status`

(I am testing Ipopt and KNITRO) : `LOCALLY_SOLVED`

, `ALMOST_OPTIMAL`

, `LOCALLY_INFEASIBLE`

. So it is hard to say whether an optimizer has reached the bound or a “real” minimum (maximum) was found near the bound.

Is there a way to rewrite this problem that `JuMP`

can distinguish between those two cases? Previously I used `NLopt`

which has some `STOPVAL_REACHED`

option which terminates the optimization when the solver reaches some predefined value.