Wrong root node number
AnsweredHi, I want to add cuts at root nodes. I first locate them by MIPNODE_NODCNT, but the node number is 5005. I am confused. Below are my codes.
if where == MIPNODE:
cnt = GRB.Callback.MIPNODE_NODCNT
print(cnt)
The result is 5005.
0
-
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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Jiajie,
\( \texttt{GRB.Callback.MIP_NODCNT} \) is just a constant (with value 5005).
The correct way to query this attribute is:nodecnt = model.cbGet(GRB.Callback.MIP_NODCNT)
Please see the Python callback example for more details.
Cheers,
David0 -
Thank you very much David. That exactly what I want.
0
Post is closed for comments.
Comments
3 comments