Suppress all console output from Gurobi
AnsweredHi,
I am using Pyomo in a floating license environment.
I set the OutputFlag parameter to 0 before the Gurobi environment is started via:
import pyomo.environ as pyo
opt = pyo.SolverFactory("gurobi_persistent")
opt.options["OutputFlag"] = 0
Yet, Gurobi prints:
Set parameter TokenServer to value "10.52.54.61"
Freeing default Gurobi environment
Any suggestions?
Thanks,
Jake
-
I'm not aware of a way to suppress these messages in Pyomo. You can do this using Gurobi's native Python API by following the instructions in the article How do I suppress all console output from Gurobi?. This requires you to create your own Gurobi environment and pass it to a model, which is not possible in Pyomo.
I set the OutputFlag parameter to 0 before the Gurobi environment is started
The OutputFlag parameter is not set before the Gurobi environment is started. Pyomo wraps around Gurobi's native Python API. Internally, Pyomo creates a new Gurobi model, which starts the default Gurobi environment. At this point, the Set parameter TokenServer to value "10.52.54.61" message is printed. Afterwards, Pyomo applies the parameters you specify to the model.
0 -
Thanks, Eli.
0
Please sign in to leave a comment.
Comments
2 comments