Suppress all console output from Gurobi
回答済みHi,
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
-
正式なコメント
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try Gurobot? -
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
投稿コメントは受け付けていません。
コメント
3件のコメント