# EXIT: Restoration Failed! with JuMP (0.21.4) and Ipopt (0.6.5)

**URL:** https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853
**Category:** Optimization (Mathematical)
**Created:** [January 24, 2021, 4:01am UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853 "2021-01-24T04:01:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![indycdrom](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@indycdrom](https://discourse.julialang.org/u/indycdrom)
#### Post date: [January 24, 2021, 4:01am UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/1 "2021-01-24T04:01:11Z")

</div>

I am really puzzled and also frustrated that no matter how simple the problem was, like one below, Ipopt returns  
**EXIT: Restoration Failed!**

using JuMP  
using Ipopt  
model = Model(Ipopt.Optimizer)  
@variable(model, x, start = 0.0)  
@variable(model, y, start = 0.0)

@NLobjective(model, Min, (1 - x)^2 + 100 \* (y - x^2)^2)  
optimize!(model)

what did I do wrong? please help!

---

<div class="post-metadata">

### Author: ![Mahbubar06](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@Mahbubar06](https://discourse.julialang.org/u/Mahbubar06)
#### Post date: [January 24, 2021, 5:16am UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/2 "2021-01-24T05:16:12Z")

</div>

Your code works fine with JuMP (0.21.5) and Ipopt(0.6.5). Maybe you can update JuMP to version 0.21.5.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [January 24, 2021, 9:31am UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/3 "2021-01-24T09:31:40Z")

</div>

Yes, there was an issue with mumps. Please update

---

<div class="post-metadata">

### Author: ![indycdrom](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@indycdrom](https://discourse.julialang.org/u/indycdrom)
#### Post date: [January 25, 2021, 2:28am UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/4 "2021-01-25T02:28:02Z")

</div>

Thanks!

just want to report back that the issue got resolved. But I am not sure how I did it.

Basically first I updated to JuMP(0.21.5) as advised but still had the same issue.

then, I tried to update all packages and build all package again, but got errors associated with CUDA\* about missing library.

so I removed all CUDA\* related stuff and install latest NVidia CUDA library. Then I reinstalled CUDA\*  
and rebuild all packages.

after that, Ipopt issue seems went away.

---

<div class="post-metadata">

### Author: ![indycdrom](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@indycdrom](https://discourse.julialang.org/u/indycdrom)
#### Post date: [January 25, 2021, 7:08pm UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/5 "2021-01-25T19:08:31Z")

</div>

Hi, now the EXIT: Restoration Failed issue was gone, but I am having strange optimal solution with the following example

**using JuMP**  
**using Ipopt**

model = Model(Ipopt.Optimizer)  
@variable(model, α, start=1.0 )  
@variable(model, β, start=1.0 )

x = [1. 2.; 3. -1; 5.0 3.;6. 7.]

f(α, β) = maximum(sum([α β] .\* x, dims=2))  
g(α, β) = minimum(sum([α β] .\* x, dims=2))  
JuMP.register(model, :f, 2, f, autodiff=true)  
JuMP.register(model, :g, 2, g, autodiff=true)  
@NLobjective(model, Max, f(α, β) / g(α, β) )  
optimize!(model)

**output**

* * *

Number of objective function evaluations = 368  
Number of objective gradient evaluations = 12  
Number of equality constraint evaluations = 0  
Number of inequality constraint evaluations = 0  
Number of equality constraint Jacobian evaluations = 0  
Number of inequality constraint Jacobian evaluations = 0  
Number of Lagrangian Hessian evaluations = 0  
Total CPU secs in IPOPT (w/o function evaluations) = 0.171  
Total CPU secs in NLP function evaluations = 0.004

EXIT: Optimal Solution Found.

* * *

**result:**  
julia\> value(α)  
-6.616112462703816e14  
julia\> value(β)  
2.2053711899565838e14  
julia\> objective\_value(model)  
0.08333330892901637

however, this is definitely not good solution as even with start number 1, the objective could be 6.5. what is wrong with my formulation?

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [January 25, 2021, 8:32pm UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/6 "2021-01-25T20:32:12Z")

</div>

Ipopt is a solver for convex problems that are twice differentiable. Your problem doesn’t meet these requirements, and it has a divide-by-zero issue when `g(a,b) = 0`.

You should consider other ways of formulating this problem (e.g., as a MIP maximizing `f(a,b) - g(a,b)` where `g(a, b) >= 0.000001` using this reformulation of `max`: [9 Mixed integer optimization — MOSEK Modeling Cookbook 3.3.0](https://docs.mosek.com/modeling-cookbook/mio.html#maximum)).

---

<div class="post-metadata">

### Author: ![indycdrom](https://avatars.discourse-cdn.com/v4/letter/i/eada6e/32.png) [@indycdrom](https://discourse.julialang.org/u/indycdrom)
#### Post date: [January 25, 2021, 10:42pm UTC](https://discourse.julialang.org/t/exit-restoration-failed-with-jump-0-21-4-and-ipopt-0-6-5/53853/7 "2021-01-25T22:42:27Z")

</div>

very nice! really appreciated! Exactly what I have been looking for! 🙂
