Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Delete only slack cuts

    Posted 04/30/09 11:22 PM

    Originally posted by: SystemAdmin


    [chicoscience said:]

    (I'm not sure if slack is the correct term in english to define a constraint which is the opposite of violated, like x <= 10 and x takes value 5)<br />
    Hello,

    I'm adding user cuts via cut callback. It's working, everything fine. But as i add more and more cuts, the linear relaxation becomes too time consuming. I'd like to remove the slack cuts from those i added.

    In XPRESS there is a function that does this very well, it removes all cuts from a specific type (or all types, it is up to you), which are slack by at least a certain parameter. You can also choose not to remove cuts which would mess up the basis.

    In CPLEX, i've only seen a function that removes all user cuts ( cplex.clearCuts() ), and i can set the DeleteMode to fix whenever i remove a cut that interferes in the basis. Is there a function in CPLEX similar to that in XPRESS? If not, how could i remove only the slack cuts and not the violated or tight ones? Should i remove them all and add again those violated, one by one?

    Thanks a lot,
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Delete only slack cuts

    Posted 05/01/09 01:36 AM

    Originally posted by: SystemAdmin


    [chicoscience said:]

    Oh well, i just tried to clear all cuts (just for test) and no cuts have been removed, i probably didn't use it well.

    In my CutCallback function, i have separation algorithms which find violated cuts and add them to the problem. My problem has an exponential number of constraints, so i do not start it with them all. I add cuts, via cutCallback, as i find them violated.

    I passed the IloCplex object as a parameter to my CutCallback function. Inside that function, just for test, i called cplex.clearCuts(). It does not make any difference to the problem. I believe i must use the clearCuts function only after calling cplex.solve.

    Then, how can i remove the cuts i've added in my callback function? Especifically, how can i remove the cuts i added which are no longer violated? Can i remove them inside my cutcallback?

    Thanks for any help (deadline is coming :-) ),
    Chicoscience
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Delete only slack cuts

    Posted 05/01/09 08:21 PM

    Originally posted by: SystemAdmin


    [prubin said:]

    I do not think there is a way to delete nonbinding cuts while the MIP algorithm is in progress.  There are ways to delete individual constraints from the model before you solve it (or after solving it, presumably before solving it again).  I'm pretty sure you cannot remove constraints during the solution process, and for that matter I'm pretty sure that cuts added in a cut callback are not considered part of the model.

    If I recall correctly, user cuts added in a callback are added to a cut pool, and CPLEX automatically removes nonbinding cuts from the node LP (but keeps them in the pool).  So I do not think that deleting them would help much, even if you could.

    You do have one option.  You can add your cuts as local cuts (using the addLocal method), which means that they will apply only at the node where they are added and its descendants.  That may reduce the size of the cut pool at each node.  The trade-off will be that you will likely end up adding the same cuts at multiple nodes.

    /Paul
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Delete only slack cuts

    Posted 05/01/09 10:32 PM

    Originally posted by: SystemAdmin


    [chicoscience said:]

    Hi Paul, many thanks for your answer! The problem i'm dealing with is quite hard, so the excessive time consuming may be because of its nature!

    To continue with the discussion... In my Branch-and-Cut, i add cuts as i find them, ok. Something odd was happening and now it is probably explained. When i add a cut do the cut pool, if cplex didn't remove nonbinding cuts, then i shouldn't find them again, violated, in my separation algorithm. That is not what was happening, Some cuts i had inserted already were violated again after some time, so i guess this happened because CPLEX had automatically removed them from the model.

    My question now is: A cut that has been removed from the LP and after a while is violated again, is it automatically readded to the LP? Or in case i find it again, i should add it one more time?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Delete only slack cuts

    Posted 05/02/09 05:36 AM

    Originally posted by: SystemAdmin


    [prubin said:]

    If you add the cut with the add() method (as opposed to the addLocal() method), then it should be applied to all current and future nodes in the tree, and CPLEX will remember it -- meaning that it will never be violated in any future node.  CPLEX leaves nonbinding cuts out of the current basis, but it checks the node LP solution against every cut in the pool, and if a cut is violated, CPLEX automatically reasserts that cut and resolves the LP.
    #CPLEXOptimizers
    #DecisionOptimization