I am using Gurobi
through JuMP
and I have been having trouble silencing the output of the optimizer.
While the statements:
set_silent(model)
set_optimizer_attribute(model, "OutputFlag", 0)
mute some of the output, it still outputs the message:
Set parameter Username
Academic license - for non-commercial use only - expires yyyy-mm-dd
I am using the Gurobi
optimizer in a loop, so this is printed multiple times. I have not been able to find a solution to this yet online. Does anybody have an answer to it?
Thank you for your time, ckolomv
There is no way to silence it. This is an explicit choice made by the Gurobi developers.
You can print only once by re-using the environment:
using JuMP, Gurobi
const env = Gurobi.Env()
for _ in 1:10
model = Model(() -> Gurobi.Optimizer(env))
end