suppress model update messages

474 views
Skip to first unread message

Dominik Goeke

unread,
Jun 19, 2016, 3:10:04 PM6/19/16
to Gurobi Optimization
Hello,

I am using the python interface and when I create a new model I constantly get these messages: <gurobi.Constr *Awaiting Model Update*>. (Even if I call m.update() every time I create a new constraint)
Is there a possibility to suppress them because they are very disturbing if one tries to demonstrate how to create a model (you cannot see the model anymore).
I already tried to disable the output using m.setParam("LogToConsole", 0) but this is not working.

Kind regards
Dominik

Kostja Siefen

unread,
Jun 19, 2016, 3:19:29 PM6/19/16
to Gurobi Optimization
Hi Dominik,

If you use the Python Interactive Shell it will print out the return value of the command by default. If you call addConstr() it will return a new constraint object. If you don't want to see the return value you can assign it to a variable. Example:

gurobi> m.addConstr(x + y <= 10)
<gurobi.Constr *Awaiting Model Update*>
gurobi> constr = m.addConstr(x + y <= 10)
gurobi>

Kostja
Reply all
Reply to author
Forward
0 new messages