# Tolerance in using JuMP optimizer

**URL:** https://discourse.julialang.org/t/tolerance-in-using-jump-optimizer/116143
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [June 24, 2024, 1:53pm UTC](https://discourse.julialang.org/t/tolerance-in-using-jump-optimizer/116143 "2024-06-24T13:53:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gustave\_Robichon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustave_robichon/32/207522_2.png) [@gustave\_Robichon](https://discourse.julialang.org/u/gustave_Robichon)
#### Post date: [June 24, 2024, 1:53pm UTC](https://discourse.julialang.org/t/tolerance-in-using-jump-optimizer/116143/1 "2024-06-24T13:53:29Z")

</div>

Hello 🙂  
I am using JuMP, and a solver named Hypatia. I want to change the tol\_inconsistent (the tolerance to numerical imprecision) to 1e-12. I found on the web that I should use this :

> julia \> MOI.set(model, MOI.RelativeGapTolerance(), 1e-9)

I should for this use the following :

> julia\> import MathOptInterface as MOI

but I get the following error :

> ERROR: MathOptInterface.UnsupportedAttribute{MathOptInterface.RelativeGapTolerance}: Attribute MathOptInterface.RelativeGapTolerance() is not supported by the model.

It seems so that I cannot do it with Hypatia ?  
When I was working with Convex, I could change this tolerance, but it seems that I can’t do it with JuMP. Is there another way to do it ? After searching the web for quite a long time, I finally ask my question here 🙂  
Thanks a lot for any answer … 🙂

---

<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: [June 24, 2024, 7:47pm UTC](https://discourse.julialang.org/t/tolerance-in-using-jump-optimizer/116143/2 "2024-06-24T19:47:55Z")

</div>

You probably want

```julia
model = Model(Hypatia.Optimizer)
set_attribute(model, "tol_inconsistent", 1e-9)

```

(I didn’t test, but this is how solver attributes should be set.)

> After searching the web for quite a long time, I finally ask my question here

Next time, don’t wait so long 😄

---

<div class="post-metadata">

### Author: ![gustave\_Robichon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustave_robichon/32/207522_2.png) [@gustave\_Robichon](https://discourse.julialang.org/u/gustave_Robichon)
#### Post date: [June 25, 2024, 9:14am UTC](https://discourse.julialang.org/t/tolerance-in-using-jump-optimizer/116143/3 "2024-06-25T09:14:15Z")

</div>

Thans a lot, it is perfect ! And I also found

> MOI.set(model, MOI.RawOptimizerAttribute(“tol\_inconsistent”), 1e-11)

have a nice day !
