# JuMP: how NOT to display the results of an optimization problem in the REPL?

**URL:** <https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429>\
**Category:** General Usage\
**Tags:** jump\
**Created:** [February 4, 2019, 3:04pm UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429 "2019-02-04T15:04:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ale](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@ale](https://discourse.julialang.org/u/ale)\
**Post date:** [February 4, 2019, 3:04pm UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429/1 "2019-02-04T15:04:08Z")

</div>

Hello!

I am using JuMP (0.18.4) (with Gurobi as solver) in a script to solve the same optimization problem for different input. This results in the same optimization problem being solved for many times.  
Now, everything seems to work, except for the fact that every time the optimization problem is solved for a certain input set, something like the following is printed in the REPL:

> Warning for adding constraints: zero or small (\< 1e-13) coefficients, ignored  
> Optimize a model with 15 rows, 76 columns and 122 nonzeros  
> Coefficient statistics:  
> Matrix range [1e+00, 1e+00]  
> Objective range [1e+00, 1e+00]  
> Bounds range [2e+02, 1e+04]  
> RHS range [0e+00, 0e+00]  
> Iteration Objective Primal Inf. Dual Inf. Time  
> 0 -5.7489940e+04 7.230620e+02 0.000000e+00 0s  
> 9 -5.7489940e+04 0.000000e+00 0.000000e+00 0s
> 
> Solved in 9 iterations and 0.00 seconds  
> Optimal objective -5.748994012e+04
> 
> Solved in 3 iterations and 0.00 seconds  
> Optimal objective -4.592409418e+04

Now, if this is printed thousands of times, at one point I don’t manage seeing some other information I may have printed beforehand in the REPL and which I may need to visualize later too.  
So, my question is: is there a way to completely suppress the aforementioned output from being printed/displayed in the REPL?  
By the way, I am using Julia 0.6.4.

---

<div class="post-metadata">

**Author:** ![tkoolen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkoolen/32/1603_2.png) [@tkoolen](https://discourse.julialang.org/u/tkoolen)\
**Post date:** [February 4, 2019, 3:21pm UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429/2 "2019-02-04T15:21:20Z")

</div>

`GurobiSolver(OutputFlag=0)`. Different solvers have different flags for controlling verbosity.

---

<div class="post-metadata">

**Author:** ![ale](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@ale](https://discourse.julialang.org/u/ale)\
**Post date:** [February 4, 2019, 3:45pm UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429/3 "2019-02-04T15:45:35Z")

</div>

@tkoolen Thank you so much, now the problem is completely solved!!

---

<div class="post-metadata">

**Author:** ![Ramipo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ramipo/32/23423_2.png) [@Ramipo](https://discourse.julialang.org/u/Ramipo)\
**Post date:** [April 1, 2021, 11:10pm UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429/4 "2021-04-01T23:10:52Z")

</div>

Hello,  
I couldn’t managed to change the verbosity in those lines of code.  
Hope you can help

optimizer = Juniper.Optimizer  
nl\_solver = optimizer\_with\_attributes(Ipopt.Optimizer, “print\_level”=\>0)  
model1 = Model(optimizer\_with\_attributes(optimizer, “nl\_solver”=\>nl\_solver))  
…  
optimize!(model1);

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [April 1, 2021, 11:37pm UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429/5 "2021-04-01T23:37:20Z")

</div>

The printing comes from Ipopt or Juniper?

---

<div class="post-metadata">

**Author:** ![Ramipo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ramipo/32/23423_2.png) [@Ramipo](https://discourse.julialang.org/u/Ramipo)\
**Post date:** [April 2, 2021, 3:13am UTC](https://discourse.julialang.org/t/jump-how-not-to-display-the-results-of-an-optimization-problem-in-the-repl/20429/6 "2021-04-02T03:13:52Z")

</div>

Hello @Henrique_Becker .  
I did manage to solve my problem by including log\_levels in the following in the model’s attributes

model1 = Model(optimizer\_with\_attributes(optimizer, “nl\_solver” =\> nl\_solver,**“log\_levels” =\> []**))

We could add in the brackets both :Info or :Table
