Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 03:29 AM

    Originally posted by: MarkusS.


    Hi!

    I am using CPLEX 12.4 and have encountered the following problem:

    When using USERCUTCALLBACK to add cuts to strengthen the formulation, I get a different solution. For example, the optimal solution value with the cuts is 24.999 and without it is 24.9988. I have already checked for errors in my seperation routine, the cuts which get added in USERCUTCALLBACK are valid in the optimal solution, which I get without cuts (ie in the 24.9988 solution).

    Best regards,
    Markus
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 04:25 AM

    Originally posted by: SystemAdmin


    What happens if you install the callback, but do not do anything in the callback?
    So, the question is: does the issue come from installing a cut callback, or is it really because of the cuts that you are adding?

    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 04:53 AM

    Originally posted by: MarkusS.


    If I do not do anything in the callback it works.

    Moreover I was able to find out the following: There are two cuts added due to the callback during solving the ILP. If I add either one of them, I get the correct optimal solution, but if both are added, I get the wrong solution.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 04:57 AM

    Originally posted by: SystemAdmin


    What happens if you just add those two cuts in advance to the model and then solve it without any callback?

    Did you already check the numerics of your problem? You could activate the "MIP kappa" feature and then display the condition numbers of the optimal basis matrices that were encountered during the solve. Additionally, exporting the model to a .sav file, then reading it into the interactive CPLEX and entering "display prob stat" may yield interesting insights...
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 05:45 AM

    Originally posted by: MarkusS.


    If I add these two cuts in advance, everything works correctly.

    I still need to try the other suggestions.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 06:30 AM

    Originally posted by: SystemAdmin


    If you would like me to take a look, please send me your models (the one with and the one without the two additional cuts) to achterberg at de dot ibm dot com.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Using USERCUTCALLBACK changes solution

    Posted Mon April 30, 2012 06:48 AM

    Originally posted by: MarkusS.


    Thank you, I have already done it myself. However, I am also using LazyConstraintCallbacks, so I think just solving the model in the interactive optimizer will give something different altogether (at least that happened, when I tried it).
    Nevertheless, here is the output of "disp prob stat" with the two added
    Variables            :     689  [Fix: 1,  Binary: 688]
    Objective nonzeros   :     540
    Linear constraints   :     837  [Less: 684,  Greater: 3,  Equal: 150]
      Nonzeros           :    3385
      RHS nonzeros       :      10
     
    Variables            : Min LB: 0.000000         Max UB: 1.000000       
    Objective nonzeros   : Min   : 0.0003000000     Max   : 26.00000       
    Linear constraints   :
      Nonzeros           : Min   : 1.000000         Max   : 9.000000       
      RHS nonzeros       : Min   : 1.000000         Max   : 10.00000
    

    and here without
    Variables            :     689  [Fix: 1,  Binary: 688]
    Objective nonzeros   :     540
    Linear constraints   :     835  [Less: 684,  Greater: 1,  Equal: 150]
      Nonzeros           :    3375
      RHS nonzeros       :       8
     
    Variables            : Min LB: 0.000000         Max UB: 1.000000       
    Objective nonzeros   : Min   : 0.0003000000     Max   : 26.00000       
    Linear constraints   :
      Nonzeros           : Min   : 1.000000         Max   : 9.000000       
      RHS nonzeros       : Min   : 1.000000         Max   : 10.00000
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Using USERCUTCALLBACK changes solution

    Posted Wed May 02, 2012 08:13 AM

    Originally posted by: SystemAdmin


    Is this a minimization or maximization problem?

    If you activate the "MIP kappa feature"
    set mip str kappa 2
    

    in the interactive and solve the two models, what is then the output of
    disp sol qual
    

    ?

    Can you add the lazy constraints explicitly to the model instead of separating them via a callback? If so, then you can better experiment with the interactive.
    Tobias
    #CPLEXOptimizers
    #DecisionOptimization