Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  python,get current node depth

    Posted 01/25/19 01:10 PM

    Originally posted by: Atefeh alizadeh


    how can I get the current node depth in node callback? is there any example you can share for python? I am using python 2.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: python,get current node depth

    Posted 01/28/19 01:30 AM

    In the node callback there is no "current node". The node callback is invoked when CPLEX has to select the next node to process. At this point in time the previous node has already been processed. In the node callback you can get the depth of any open node using the callback's get_depth() function. Pass which_node=0 to get the depth of the node that CPLEX would select next. You can see all the callback's functions in the reference documentation here.

    If you want to get the depth of the current node in another callback then you have to follow the instructions in this thread.


    #CPLEXOptimizers
    #DecisionOptimization