Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How does the LP relaxation in cplexmilp differ from cplexlp .

    Posted 11/18/14 10:00 AM

    Originally posted by: G8Q3_SV


    Hello ,

    While I was trying to call cplex using cplexmilp function the LP relaxation solution was generated within few mins.

    But when I try to call the same problem using cplexlp it takes long time to give a solution.

    I wonder how is this possible ? When cplex can find the LP relaxation solution within minutes why is it taking so long time when I call the function cplexlp ?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How does the LP relaxation in cplexmilp differ from cplexlp .

    Posted 11/18/14 06:22 PM

    Originally posted by: EdKlotz


    This can happen because CPLEX performs additional preprocessing when you give in an MILP instead of the associated relaxation.  For example, consider the following two constraints and 4 binary variables

    2x1 + x2 + x3         = 2

             x2 + x3 + x4 <= 1

    xj binary

    For a MIP, CPLEX's probing will recognize that if x = 0, x2 = x3 = 1 by the first constraint, which results in an infeasibility in the second constraint.  Hence, since x1 is binary, we can immediately fix x1 to 1 when preprocessing the MIP.   We can't do that in the LP case.   While it still is true that setting x = 0 results in infeasibility for the LP as well, we can't just fix x1 to  1 since solutions exist with fractional values (e.g. x1 = 1/2, x2 = 1, x3 = 0, x4 = 0).  Thus, additional, integrality based preprocessing can make a difference.

    As a test, you could try turning off CPLEX's presolve and probing parameters when you call cplexmilp.   That would probably yield more consistent results (albeit consistently slow).   However, I don't think even doing that would guarantee that you get the same results, as CPLEX still might take advantage of integrality in some other way before the initial root node relaxation solve.

    If you need to solve the MILP, I don't see any good reason why you should want to solve the associated initial LP relaxation separately.   How do you want to use that LP solution?   In general I would recommend just solving the MILP directly.  


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How does the LP relaxation in cplexmilp differ from cplexlp .

    Posted 11/27/14 01:35 PM

    Originally posted by: G8Q3_SV


    Thank you EdKlotz. 

    Sorry for delayed reply. 

    I wanted to check if there was any degeneracy thats why I tried calling CPLEXLP.

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: How does the LP relaxation in cplexmilp differ from cplexlp .

    Posted 11/28/14 12:23 PM

    Originally posted by: EdKlotz


    OK, checking the LP relaxation for degeneracy sounds reasonable.   But, you are still better off looking at the actually LP relaxation that CPLEX solves after applying MIP presolve and probing reductions.   In that regard,  you can set CPLEX's MIP display parameter to 4 and see the initial root node LP solve.   You can then see if there are any long sequence of iterations with no improvement in the objective, a telltale sign that degeneracy is slowing performance and that you may want to consider using a different LP algorithm when solving the root node.

    Also, regarding the example in my previous response, I see that I wrote "x" a couple of times when I meant "x1".   I hope that did not create any confusion.


    #CPLEXOptimizers
    #DecisionOptimization