Tolerance in using JuMP optimizer

Hello :slight_smile:
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 :slight_smile:
Thanks a lot for any answer … :slight_smile:

You probably want

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 :smile:

1 Like

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

MOI.set(model, MOI.RawOptimizerAttribute(“tol_inconsistent”), 1e-11)

have a nice day !

1 Like