Suppress `Warning for adding constraints: zero or small (< 1e-13) coefficients, ignored`
AnsweredI've searched for a way to suppress the `Warning for adding constraints: zero or small (< 1e-13) coefficients, ignored` but no successful code so far. Anyone can help me? My code snippet which rises the warning is as follows:
import pyomo.environ as pye
pye.SolverFactory('gurobi_persistent').set_instance(model)
0
-
You can use a gurobi.env file to set OutputFlag or LogToConsole to 0 as described as the second option in How do I suppress all console output from Gurobi?
Managing the Gurobi environment and setting parameters before it starts, can now be done in pyomo as follows:
import pyomo.environ as pye
options = {"OutputFlag": "0"}
pye.SolverFactory('gurobi_persistent', manage_env=True, options=options).set_instance(m)0 -
Thank you
0
Please sign in to leave a comment.
Comments
2 comments