Suppress console outputs
回答済みHello,
How do I suppress all console outputs when using gurobipy.read(...)?
Thanks,
Xinshuo
0
-
正式なコメント
This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Xinshuo,
To suppress all output, you can set the OutputFlag parameter to 0 in your environment. Alternatively, you can direct the log to a file without printing it to the console by setting the LogToConsole parameter to 0 in your environment. For example,
import gurobipy as gp
#create an environment
env = gp.Env()
# set parameters to supress outputs
env.setParam("OutputFlag",0) # supress all outputs
#env.setParam("LogToConsole",0) # supress console outputs only
# use the env when reading the model m = gp.read("glass4.mps", env)Regards,
Simran
0 -
I have updated the article How do I suppress all console output from Gurobi? to include an example of reading a model from a file.
0 -
Thank you very much.
0
投稿コメントは受け付けていません。
コメント
4件のコメント