Decision Optimization

Decision Optimization

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

 View Only
  • 1.  getting branched variables

    Posted Fri January 25, 2019 01:20 PM

    Originally posted by: Atefeh alizadeh


    is there any solution to get variables that already branched at each node? I search this forum and the only answer that I got is that this topic is discussed before. but I cannot find any reasonable answer. some of them says that I should branch callback while others tell that I should use node callback. i am using python 2.

    https://www.ibm.com/developerworks/community/forums/html/topic?id=6eadf6ed-be91-49bb-9913-57694d9bfb16&ps=100

    https://www.ibm.com/developerworks/community/forums/html/topic?id=39181526-21db-4085-9b2c-abc14e8739a3&ps=25

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: getting branched variables

    Posted Mon January 28, 2019 01:25 AM

    I think the two threads you mentioned are good. Maybe you just got confused because they handle two different questions:

    1. Get the variable that was branched upon to create a particular node. This can be done using a node callback and using that callback's get_branch_variable() function.
    2. Get all the branchings that lead up to the current node (i.e. include branching variables for ancestor nodes as well). This can only be done using a branch callback and node user data.

    I guess that what you want to do is some variation of 2. Note that the node callback is really limited in what you can do from that callback. Other than inspecting all the open nodes, the only thing you can do is to select the next node to process.


    #CPLEXOptimizers
    #DecisionOptimization