Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

How to generate Gomory Cut by using cplex solver?

  • 1.  How to generate Gomory Cut by using cplex solver?

    Posted Tue February 14, 2012 05:05 AM

    Originally posted by: waldstein


    Hi all,

    would you please tell me how to generate the Gomory cut when using cplex.Solve() to solve a LP relaxation of a IP?

    Thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Tue February 14, 2012 08:42 AM

    Originally posted by: SystemAdmin


    I think CPLEX will automatically detect the opportunity to add Gomory Cut and you can adjust the parameters to change the frequency it is generated (from not use at all to very often).
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Tue February 14, 2012 02:20 PM

    Originally posted by: SystemAdmin


    Exactly. CPLEX will generate Gomory cuts automatically during a MIP solve. You can control the aggressiveness of the Gomory cuts via a parameter.

    Or are you looking for a way to calculate Gomory cuts yourself?

    If so you need to convert your IP into an LP by dropping the integrality restrictions. Then, solve the LP as usual. Finally, compute the tableau rows and apply the Gomory cut formula yourself. In the C API you can get the tableau rows using the method CPXbinvarow(). I don't know whether such a method is also available in Concert.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Tue February 14, 2012 09:00 PM

    Originally posted by: waldstein


    Hi Tobias,

    glad to see your help again :)

    Yes, I am trying to implement cutting plane myself.

    Would you please tell me if cplex solver has a separte cutting plane function to solve a given LP? You have told me that cplex use branch-and-cut to solve MIP but here I just want to use the cutting process..I want to add cutting process to my branch-and-price algorithm.

    Thanks.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Wed February 15, 2012 06:04 AM

    Originally posted by: SystemAdmin


    If I understand you correctly, you want to provide a MIP, have CPLEX generate cutting planes for it, and then read out the LP relaxation plus cuts that you want to use for your branch-and-price.

    Yes, this can be done, but only in the C API and it is not trivial. You need to use a cut or a branch callback to access the nodelp, and then the last rows of the nodelp are the cuts. You can uncrush them to get cuts for the original (not presolved) model.

    But I don't think that this is useful for branch-and-price. Namely, similar to presolve, CPLEX assumes for the cutting plane procedures that all columns are known and the constraints are "final" (i.e., there are no coefficients for columns that CPLEX does not know of). If this assumption is wrong, then the cutting planes are not valid.

    Let me explain this with an example. Consider a set partitioning problem, where you have generated some columns such that it looks like this:
    
    min  x1 + x2 + x3 + x4 s.t. x1 + x2 + x3      = 1 x1 + x2      + x4 = 1 x1      + x3 + x4 = 1
    

    CPLEX can now generate the clique cut
    
    x1 + x2 + x3 + x4 = 1
    

    But now let's assume that your pricing method would later add a column x5 such that the system looks like this:
    
    min  x1 + x2 + x3 + x4 + x5 s.t. x1 + x2 + x3      + x5 = 1 x1 + x2      + x4 + x5 = 1 x1      + x3 + x4 + x5 = 1
    

    Suddenly, the clique cut that CPLEX generated is no longer valid, because (0,0,0,0,1) is a feasible solution.

    If you want to use cuts from CPLEX for your branch-and-price, then you also have to extend your new columns towards the cuts, i.e., you need to add coefficients for the new columns to all of the cuts such that they stay valid. In the example above, the cut has to be extended to read
    
    x1 + x2 + x3 + x4 + x5 = 1
    

    For clique cuts this may be doable, but in the general case, you just do not know how to extend the cuts appropriately. Additionally, those cuts will of course get dual variables that are part of the dual solution. Typically, this will mess up your pricing problem.

    In short: branch-cut-and-price is a very delicate topic and very hard to implement. There are so many things to consider. I have never seen general purpose cutting planes being used in BC&P applications (but I am not an expert, so there may be some). I think this can only work well if you have problem specific cuts for which you know how the pricing problem needs to be transformed to deal with them.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Wed February 15, 2012 09:01 PM

    Originally posted by: waldstein


    Tobias,

    thanks!

    maybe I have to generate the cut myself. Let me try it.

    Another interesting thing is: when I used visualization tool to display the branching process of cplex solver itself. I found some node only produced one child (I thought it was two before....) while others still produced two branches. In what situation does it produce only one branch?
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Thu February 16, 2012 08:44 AM

    Originally posted by: SystemAdmin


    If CPLEX finds out that one branch is infeasible (e.g., due to strong branching), then it would only create one child node.
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Tue February 14, 2012 08:49 PM

    Originally posted by: waldstein


    Hi Jim,

    thanks for the response.

    I am trying to implement Gomory cut myself. So I am wondering if cplex solver could give me some useful info :)
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Wed May 21, 2014 12:02 AM

    Originally posted by: maiklb2005


    Hi All, I was curious how does CPLEX generate Gomory cuts. In particular, what linear coefficients or what rule to compute linear coefficients does CPLEX use to aggregate cuts? 


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Wed June 04, 2014 04:34 AM

    Originally posted by: AndreaTramontani


    Hi.

    Gomory cuts are an important family of cutting planes for Mixed Integer Programmming (MIP). Please refer, e.g., to "G. Cornuejols, Valid inequalities for mixed integer linear programs, Math. Prog. Ser. B 112, 2008, 3-44" for a tutorial survey on several families of cutting planes for MIP. However, Gomory cuts are also known to be sensible to numerical issues, and they can introduce numerical issues themselves (see, e.g., "F. Margot, Testing cut generators for mixed-integer linear programming, Math. Prog. Computation 1, 2009, 69-95").
    In CPLEX we separate Gomory cuts following 2 steps:
    1. The tableau row is re-computed, from the constraints and the multipliers given by the basis inverse.
    2. The cut is generated on the re-computed tableau row.
    As it is customary, in both step 1 and 2 we adopt a number of safeguard tolerances, to try to avoid producing unstable/invalid tableau rows first, and Gomory cuts second. In addition, after the cut has been computed, we also apply a filtering to discard Gomory cuts that look unstable and that are likely to introduce numerical issues in the problem at hand.


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: How to generate Gomory Cut by using cplex solver?

    Posted Thu December 11, 2014 02:12 PM

    Originally posted by: maiklb2005


    Dear Andrea,

    Thank you, the references are indeed helpful. However, the explanation of how constraints are combined on p. 27 of (Cornuejols, 2008) is a little obscure. Could you please recommend a reference that specifically focuses on computations of multipliers from the basis inverse? I found in "Ceria, S., Cornuéjols, G., and Dawande, M. 1995. Combining and strengthening Gomory cuts. E. Balas and J. Clausen, eds. Proc. 4th IPCO Conference, Copenhagen, Denmark. Springer-Verlag, 438-451" that multipliers are chosen by maximizing the right-hand side fractions. Is this method used by CPLEX? What are the fundamental differences of this method from using the basis inverse in terms of efficiency? Thank you. 

    P.S. If one saves cuts generates by CPLEX, is there a guarantee that none of the cuts will be violated? Thank you.

    #CPLEXOptimizers
    #DecisionOptimization