# Can you use Gurobi's \`ObjNRelTol\` and \`ObjNAbsTol\`?

**URL:** <https://discourse.julialang.org/t/can-you-use-gurobis-objnreltol-and-objnabstol/96327>\
**Category:** Optimization (Mathematical)\
**Created:** [March 20, 2023, 3:29am UTC](https://discourse.julialang.org/t/can-you-use-gurobis-objnreltol-and-objnabstol/96327 "2023-03-20T03:29:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gleyland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gleyland/32/15339_2.png) [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Post date:** [March 20, 2023, 3:29am UTC](https://discourse.julialang.org/t/can-you-use-gurobis-objnreltol-and-objnabstol/96327/1 "2023-03-20T03:29:28Z")

</div>

Hi,

As for the subject. We’ve tried

```julia
MOI.set(grb, Gurobi.MultiObjectiveAttribute("ObjNRelTol", 0.001))

```

But we got

```julia
ERROR: LoadError: UndefVarError: MultiObjectiveAttribute not defined

```

We’re on Gurobi 0.11.5, which seems to be the latest, but our local MOI\_multi\_objective.jl looks nothing like the one on Github. Are we doing anything obviously wrong, or do we need to wait for a later release of Gurobi.jl?

Thanks!  
Geoff

---

<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:** [March 20, 2023, 3:40am UTC](https://discourse.julialang.org/t/can-you-use-gurobis-objnreltol-and-objnabstol/96327/2 "2023-03-20T03:40:01Z")

</div>

I guess I forgot to “come back in a few days” for this: [Prep for v1.0.0 by odow · Pull Request #505 · jump-dev/Gurobi.jl · GitHub](https://github.com/jump-dev/Gurobi.jl/pull/505)

---

<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:** [March 20, 2023, 3:57am UTC](https://discourse.julialang.org/t/can-you-use-gurobis-objnreltol-and-objnabstol/96327/3 "2023-03-20T03:57:17Z")

</div>

> [@gleyland](#):
>
> `MOI.set(grb, Gurobi.MultiObjectiveAttribute("ObjNRelTol", 0.001))`

Once I tag v1.0.0, it’ll be something like:

```julia
MOI.set(grb, Gurobi.MultiObjectiveAttribute(1, "ObjNRelTol"), 0.001)

```

---

<div class="post-metadata">

**Author:** ![gleyland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gleyland/32/15339_2.png) [@gleyland](https://discourse.julialang.org/u/gleyland)\
**Post date:** [March 20, 2023, 7:38am UTC](https://discourse.julialang.org/t/can-you-use-gurobis-objnreltol-and-objnabstol/96327/4 "2023-03-20T07:38:59Z")

</div>

Thanks Oscar!

And whoops, what you had was what we ended up at - looks I just pasted an old attempt.
