Decision Optimization

Decision Optimization

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

 View Only
  • 1.  about the cutcallback for cutt adding

    Posted Sun June 29, 2008 02:33 AM

    Originally posted by: SystemAdmin


    [leo said:]

    Hi, all,

    I use a cut callback to control the cut adding in CPLEX. At each node, I get the cut and add it as local cut.
    Then, I want to solve this new subproblem and produce new cuts until no cut can be found.

    I use CPXcutcallbackaddlocal  to add the local cut, then I clone the node lp to a colonelp. But I found that the colonelp is not associated with the added cuts. In other words, the colonelp is same as the original node lp. Is there any probelm about my implementation?

    Is there any method to get the updated node lp?  Thanks.


    Leo
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: about the cutcallback for cutt adding

    Posted Sun June 29, 2008 03:12 AM

    Originally posted by: SystemAdmin


    [prubin said:]

    I believe you have to keep track of added cuts yourself.  AFAIK CPLEX does not have a method to get a list of user-added cuts.  I think you can use the cbhandle argument to advantage here -- maybe keep copies of all your local cuts in a linked list and pass yourself pointers to the first and last entries in that list enforced at the current node via the cbhandle.  I've never done this myself, though, since I use the Java API.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: about the cutcallback for cutt adding

    Posted Sun June 29, 2008 08:04 AM

    Originally posted by: SystemAdmin


    [leo said:]

    [quote author=prubin link=topic=366.msg1039#msg1039 date=1214691135]
    I believe you have to keep track of added cuts yourself.  AFAIK CPLEX does not have a method to get a list of user-added cuts.  I think you can use the cbhandle argument to advantage here -- maybe keep copies of all your local cuts in a linked list and pass yourself pointers to the first and last entries in that list enforced at the current node via the cbhandle.  I've never done this myself, though, since I use the Java API.


    Thank you very much.

    Do you mean that I can not get the updated node LP by CPXgetcallbacknodelp although I have added some local cuts at current node?
    If CPLEX goes to the branched node of current node, I use CPXgetcallbacknodelp to get the node LP.  Does this new node LP contain the cuts added at its parent node?

    If both cases fail, I have to keep track of added cuts as you mentioned.

    Becuase I can not write some constraints explicitly, I have to added the cuts based on the node relaxation solution. Then the cust are added as local cuts. I then solve the updated node lp and check new cuts. The above procedure is repeated until no cut can be found at each node.
    So I have to know the updated node LP.

    At current node, I  can use another way to get the updated node LP indirectly. At first, I clone the node lp to clonelp. Then once new cut is found, I first add this cut to as local cut. At the same time, I can use add a new constraint to clonelp. Based on the updated clonelp, I can slove it again (indirectly solve the updated node lp) and try to get the cuts.

    But if the added local cuts can not be shown in the children node LP by  CPXgetcallbacknodelp,  the problem may become more complicated. At that time, I have to keep track of added cuts at each node as you suggested. And I have to know the exact relation between the parent node and children nodes.

    Do you have any suggestions? Thanks.


    Leo



    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: about the cutcallback for cutt adding

    Posted Sun June 29, 2008 08:15 PM

    Originally posted by: SystemAdmin


    [prubin said:]

    Do you mean that I can not get the updated node LP by CPXgetcallbacknodelp although I have added some local cuts at current node?

    Yes, that is what I mean.

    If CPLEX goes to the branched node of current node, I use CPXgetcallbacknodelp to get the node LP.  Does this new node LP contain the cuts added at its parent node?

    I think not.  You might check this with ILOG tech support.

    If both cases fail, I have to keep track of added cuts as you mentioned.

    Exactly.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: about the cutcallback for cutt adding

    Posted Sun June 29, 2008 10:26 PM

    Originally posted by: SystemAdmin


    [leo said:]

    [quote author=prubin link=topic=366.msg1046#msg1046 date=1214752492]
    Do you mean that I can not get the updated node LP by CPXgetcallbacknodelp although I have added some local cuts at current node?

    Yes, that is what I mean.

    If CPLEX goes to the branched node of current node, I use CPXgetcallbacknodelp to get the node LP.  Does this new node LP contain the cuts added at its parent node?

    I think not.  You might check this with ILOG tech support.

    If both cases fail, I have to keep track of added cuts as you mentioned.

    Exactly.



    Thanks.

    Like what I said, for current node, I can add the cuts as a row to a clone lp in order to get the updated node LP.

    Now the problem is how to reflect the added cuts in the subproblem of children nodes. I have sent a email to the ILOG support. When I get the answer, I will let you know. Thanks.


    Leo
    #CPLEXOptimizers
    #DecisionOptimization