Suppress console outputs
AnsweredHello,
How do I suppress all console outputs when using gurobipy.read(...)?
Thanks,
Xinshuo
0
-
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
Please sign in to leave a comment.
Comments
3 comments