what is getNodeID() in BranchCallback

岁酱吖の 提交于 2019-12-13 03:55:37

问题


I want to retrieve the value of Node and NodeID in CPLEX through callbacks in c++. I use getNodeid() in BranchCallback but it wasn't true.Because the value of this function is different from the value of NodeID in logfile.


回答1:


The value returned by getNodeId() is different from what is displayed in the NodeID column in the log.

  • getNodeId() returns the sequence number of a node. That number is a unique id that is created/set when the node is created.
  • NodeID in the log returns the id of a node. The id is assigned when the node is processed. In a single-threaded run the root node has id 0, the next node processed has id 1, the next node has id 2 etc.

So the two values are unrelated.



来源:https://stackoverflow.com/questions/56997300/what-is-getnodeid-in-branchcallback

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!