Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Change the pointer node_userhandle in a cutcallback ?

    Posted 04/27/12 02:28 AM

    Originally posted by: S.U.N.


    Hello,

    Is it possible to change the pointer of a node_userhandle within the cutcallback procedure ?
    In my branch-and-cut the best variable to branch on is known at the end of the cutcallback if no cuts is found. I would like to assign this information to the node in the cutcallback procedure to avoid having to recompute it again at the start of the branchcallback. (Can be time-consuming)

    Having the possibility to change the pointer itself (the address it points to, instead of the content), would allow me to simply create a fixed array "(int) VAR" where "VAR(i)=i", and then assign to the node a pointer to the address of "VAR(variable_to_branch_on)". (Therefore, no need to add new cells during branching and no need to handle the destruction of cells assigned to a deleted node).
    So, how can I change the pointer of a node_userhandle from the cutcallback procedure ?
    Best regards,

    Sandra
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Change the pointer node_userhandle in a cutcallback ?

    Posted 04/27/12 02:33 AM

    Originally posted by: SystemAdmin


    It is not possible to change that pointer from a cut callback procedure.
    The user object for a node is set from the branch callback by means of CPXbranchcallbackbranchbds() and friends and cannot be changed afterwards.
    If you don't want to create new objects for each node you could use a global map that maps a node's sequence number to the variable to branch on.
    #CPLEXOptimizers
    #DecisionOptimization