Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  father node?

    Posted 02/24/12 09:44 AM

    Originally posted by: frangio


    The question seems easy, but I've not found any solution in the manual (my fault, likely): how can I get to know the father of a given node? We have some "extra" information that we'd need to pass father-to-son, hence when I process one node I'd need to be able to reconstruct who its father was. I could probably do some complicated bookkeeping in the branchcallback (BTW, I'm using the callable libraries), but is there any simpler way? CPXXgetcallbacknodeinfo does not seem to help ...

    Since I'm writing, I'd ask another thing. I happen to be able to compute a bound that can be (but it is not necessarily) better than the LP bound. This can be made e.g. in the solvecallback. Assuming I discover that my bound is actually so much better that I can fathom the node, while Cplex cannot, is there a quick way to tell it "just fathom this node and don't bother"? From other posts, it seems to me that the default way to fathom a node is to have the branchcallback to report "zero nodes". Which is OK, but it also means that I have to wait for all the default + user cuts, and possibly strong branching etc., to finish before being able to tell Cplex that it should not actually have bothered at all. If it was possible to just overwrite the LB value from the solvecallback, passing my own instead of the LP one, it would in principle be quicker. Or any other trick to the same effect.

    Thank you

    Antonio
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: father node?

    Posted 02/24/12 10:13 AM

    Originally posted by: SystemAdmin


    The only way to get information about the parent node is by means of the "complicated bookkeeping" in the branch callback. Note that the father node no longer exists when any of its children are processed.

    Concerning the pruning a node as quick as possible: the only idea that comes to my mind right now is to use a cut callback and just install a local cut that results in an objective function value that forces the node to get pruned.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: father node?

    Posted 02/24/12 10:32 AM

    Originally posted by: frangio


    Thank you for the quick answer. The idea of the "fake cut" (something akin to 0 <= -1) actually also came to us, and since we are using the cutcallback anyway we'll probably test it. Of course, having some more "formal" support for this kind of situation would have been nice, so if you have any chance to add this among the users' desiderata, we'd appreciate that. I can easily imagine a number of applications where doing what we want to do is possible. LP bounds are great, but they are by no means the only ones ...

    Regards

    Antonio
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: father node?

    Posted 03/01/12 04:08 AM

    Originally posted by: SystemAdmin


    I added this to the list of user wishes. Of course, I cannot make any promises about if/when this is going to be implemented.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: father node?

    Posted 03/01/12 04:33 AM

    Originally posted by: frangio


    Thanks. That's the difference between a wish and an order. :-)

    Since I'm here: it seems to me there is a typo or something in the manual of Cplex 12.4 regarding the

    CPXsetdeletenodecallbackfunc

    The manual states that the callback function is

    int callback (CPXCENVptr env,
    void *cbdata,
    int wherefrom,
    void *cbhandle,
    int seqnum,
    void *handle);

    However, trying to compile it we get errors. And indeed the relevant definition in cpxconst.h is

    #define CALLBACK_DELETENODE_ARGS CPXCENVptr xenv,\
    int wherefrom, void *cbhandle, int seqnum, void *handle

    I've checked, and it has been like this since at least 12.2.

    It seems "cbdata" is missing, although it looks that nobody is going to actually miss it, since according to the manual

    cbdata

    A pointer passed from the optimization routine to the user-written callback that identifies the problem being optimized. The only purpose of this pointer is to pass it to the callback information routines.

    So I guess we can just eliminate cbdata from the function definition and live with that. Which is fine for us, but perhaps you may want the manual to be updated. Unless, of course, I'm missing something.

    Regards

    Antonio
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: father node?

    Posted 03/01/12 05:20 AM

    Originally posted by: SystemAdmin


    You are correct, the cbdata argument does not exist and should not appear in the documentation. This was discovered recently by another user as well in this thread.
    Thank you for reporting this issue. This time I can promise that we will fix it :-)
    #CPLEXOptimizers
    #DecisionOptimization