如何获得脚本中探索的分支和切割节点的数量?

How can I get the number of branch and cut nodes explored within the script?

如何获取脚本中探索的分支和切割节点的数量?我正在使用 python docplex。

使用 Model.solve_details 中包含的 solve details 信息。更准确地说:

  nb_nodes = mdl.solve_details.nb_nodes_processed

http://ibmdecisionoptimization.github.io/docplex-doc/mp/docplex.mp.sdetails.html#docplex.mp.sdetails.SolveDetails.nb_nodes_processed