Skip to main content

Suppress all console output from Gurobi




  • Eli Towle
    Gurobi Staff Gurobi Staff

    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 "" message is printed. Afterwards, Pyomo applies the parameters you specify to the model.

  • Jacob Wren

    Thanks, Eli.


Please sign in to leave a comment.