Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Branching after rejecting an integer solution using Incumbent callabck

    Posted 10/15/18 03:51 AM

    Originally posted by: Arun2325


    I understand that Incumbent callback can be used to reject an integer solution found by Branch and Bound. In my work, for the node whose integer solution is rejected, I need to branch, create two children nodes, add new constraints to the children nodes (similar to adding constraints by using make_branch function in CPLEX branchcallback) and continue the branch and bound procedure. Please suggest if there is a way to do the same.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Branching after rejecting an integer solution using Incumbent callabck

    Posted 10/15/18 03:58 AM

    Yes, you can do this. You have to use an incumbent callback and a branch callback. In the incumbent callback reject the solution and in the branch callback you can then create the desired branches. If you need to transfer information from the incumbent to the branch callback then you can use node user data for this.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Branching after rejecting an integer solution using Incumbent callabck

    Posted 10/15/18 01:17 PM

    Originally posted by: Arun2325


    Thanks. This is helpful,I will initiate an incumbent callback (invoked every time an incumbent solution is found) and a branching callback. When I implemented it I got this peculiar output: Sometimes a node containing incumbent solution (i.e. incumbent callback is invoked) returns falls value to is_integer_feasible() function call in the branch callback i.e. incumbent callback is invoked even though the solution is not integer feasible. Isn't this contradictory? Please let me know what I am missing here.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Branching after rejecting an integer solution using Incumbent callabck

    Posted 10/15/18 01:26 PM

    The incumbent callback is not only invoked for integral nodes. It is also invoked for solutions found by heuristics. I guess in your case a heuristic found a solution at that node and invoked the incumbent callback to check whether the solution should be accepted.

    You can use the callback's get_solution_source() function to detect where the solution came from. Unless the solution came from an integral node you can just reject without doing anything in the branch callback.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Branching after rejecting an integer solution using Incumbent callabck

    Posted 10/15/18 10:50 PM

    Originally posted by: Arun2325


    Yeah, this makes sense. However, even now I see nodes which have incumbent solution coming from node_source (111) but is not integer feasible (is_integer_feasible() = False). Please let me know where I am going wrong.


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Branching after rejecting an integer solution using Incumbent callabck

    Posted 10/25/18 07:41 AM

    This may be surprising but it makes sense: All integer variables have integer values but by rejecting it in the incumbent callback you explicitly told CPLEX that this node is not integer feasible (for reasons that CPLEX does not know about).

    Do you use is_integer_feasible() to detect whether you rejected that node in the incumbent callback? If so then this is better done either using node user data or by keeping a global map that keeps track of the id of nodes that were rejected in the incumbent callback.


    #CPLEXOptimizers
    #DecisionOptimization