Cut loop at root node of MIP
AnsweredDear,
I try to learn the operations of Gurobi at root node for MIP.
I have a MIP by C++, and I set
model.set(GRB_IntParam_Cuts, 0);
Meanwhile, I write call back function as:
if (where == GRB_CB_MIPNODE) { if (getDoubleInfo(GRB_CB_MIPNODE_NODCNT) == 0)
{ cout << "Root node~~" << endl; } }
When I run the program, Gurobi still prints "Root node" two times in the log.
I would like to know what's the reason of this?
Many thanks,
Fan
-
Official comment
This post is more than three 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 why not try our AI Gurobot?. -
Hi Fan,
The MIPNODE callback is called once for each cut pass that occurs at the root node. This is described in more detail in the callback codes documentation.
I hope this helps. Thanks!
Eli
0 -
Hi Eli,
Thanks for your reply. I set
model.set(GRB_IntParam_Cuts, 0);
which means to shut off cuts.
Then why Gurobi still inserts cuts?
Best regards,
Fan
0 -
Hi Fan,
Gurobi is not inserting cuts if you turn off cuts. However, there are also other things going on in the root node, like for examples heuristics and this can also cause a log line to be printed.
Also can you share a log file?
Best regards,
Sonja
0 -
Hi Sonja,
Thanks for your reply. I got your point. I attached a picture.
0 -
OK, cool. This confirms that no cuts are generated and these are more or less heuristics that generate these lines.
Sonja
0 -
Hi Sonja, thanks for your reply. I understand!
0
Post is closed for comments.
Comments
7 comments