# Set the solver tolerance in Optimization Based Bound Tightening (OBBT)

**URL:** <https://discourse.julialang.org/t/set-the-solver-tolerance-in-optimization-based-bound-tightening-obbt/17797>\
**Category:** Optimization (Mathematical)\
**Created:** [November 21, 2018, 12:53am UTC](https://discourse.julialang.org/t/set-the-solver-tolerance-in-optimization-based-bound-tightening-obbt/17797 "2018-11-21T00:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rasoul](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Post date:** [November 21, 2018, 12:53am UTC](https://discourse.julialang.org/t/set-the-solver-tolerance-in-optimization-based-bound-tightening-obbt/17797/1 "2018-11-21T00:53:33Z")

</div>

Hi all,

I have been working with optimization based bound tightening code in PowerModels for a while. I have a question about setting solver tolerance in which the OBBT code can work for different test cases without any warning (e.g. adjust tolerances in solver to avoid the issue). Can you please let me know what is the best value of solver tolerance that can work for most test systems? Thanks in advance!

All the best,  
Rasoul

---

<div class="post-metadata">

**Author:** ![ccoffrin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ccoffrin/32/400_2.png) [@ccoffrin](https://discourse.julialang.org/u/ccoffrin)\
**Post date:** [November 21, 2018, 1:18am UTC](https://discourse.julialang.org/t/set-the-solver-tolerance-in-optimization-based-bound-tightening-obbt/17797/2 "2018-11-21T01:18:55Z")

</div>

Given the numerical accuracy of most modern solvers I don’t think their is a simple or ideal answer to this question. In the release version of PowerModels we choose values that seemed to be robust across a multiple solvers and test cases.

In this [report](https://arxiv.org/abs/1809.04565), we considered for the following slightly different tolerances, which seemed to be suitable for the specific case of using Guorbi v8.0,

OBBT Settings

```julia
min_bound_width = 1e-3
termination = :avg
improvement_tol = 1e-4

```

Gurobi Settings

```julia
:BarConvTol = 1e-6

```

---

<div class="post-metadata">

**Author:** ![Rasoul](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Rasoul](https://discourse.julialang.org/u/Rasoul)\
**Post date:** [November 21, 2018, 1:21am UTC](https://discourse.julialang.org/t/set-the-solver-tolerance-in-optimization-based-bound-tightening-obbt/17797/3 "2018-11-21T01:21:05Z")

</div>

Thank you so much! I really appreciate it.

All the best,  
Rasoul
