Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

ineffective cut

  • 1.  ineffective cut

    Posted Wed May 18, 2011 07:38 AM

    Originally posted by: SystemAdmin


    Hi everybody,

    I have got a MIP which solves at the root node as integer to the following nonzeros:

    y[0][1][0] = 1;
    y[1][9][0] = 1;
    y[9][8][0] = 1;
    y[8][6][0] = 1;
    y[6][7][0] = 1;
    y[7][5][0] = 1;
    y[5][3][0] = 1;
    y[3][4][0] = 1;
    y[4][2][0] = 1;
    y[2][0][0] = 1;
    

    Inside the cut callback I generate some cuts one of which is the following cut:

    -136.64006410256411 * delta[0][2]  + -15.690320512820513 * y[0][2][0]  + -15.690320512820513 * y[0][2][1]  + -15.690320512820513 * y[0][2][2]  + -1.6841666666666697 * y[1][2][0]  + -1.6841666666666697 * y[1][2][1]  + -1.6841666666666697 * y[1][2][2]  + 7.4919166666666683 <= 0
    


    clearly none of the variables appearing in this cut is nonzero and if i add this cut then it must turn on at least one of those which together with "7.4919166666666683" becomes <= 0.

    unfortunately after adding his cut still control goes to the incumbent callback and the solution is not cut off!!!! One might say that this solution has been found by a heuristic then I have set the heurfreq to 0. also set the PreDual to -1.
    I must also display the log here:
    Nodes                                         Cuts/ 
       Node  Left     Objective  IInf  Best Integer     Best Node    ItCnt     Gap         Variable B No
    deID Parent  Depth
     
          0     0    42749.9668     0                  42749.9668      610
    *     0     0      integral     0    42749.9668    42749.9668      610    0.00%
       0             0
    Elapsed real time =  22.95 sec. (tree size =  0.00 MB, solutions = 1)
     
    User cuts applied:  10
    4.5396291
    


    even though I have set the heurfreq to -1, as * shows it is still active.

    I am kinda lost control over what is going on. Why the cuts are ineffective while are apparently applied.

    Any comment is highly appreciated.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: ineffective cut

    Posted Wed May 18, 2011 10:13 AM

    Originally posted by: SystemAdmin


    Apparently, the heuristic is not disable even in presence of heurfreq=-1.
    I keep rejecting solutions from inside the incumbent callback and got to some where as follows:

    *  1320   640      integral     0  2860898.4955  2531385.0238   321642   11.52%      y[1][3][2] R   1320   1319     20
       1326   634        cutoff        2860898.4955  2541148.1370   326624   11.18%      y[2][0][0] R   1326    644      9
       1330   630        cutoff        2860898.4955  2541995.1463   331507   11.15%      y[3][7][0] U   1330    647     11
       1336   624        cutoff        2860898.4955  2543561.4556   337112   11.09%      y[5][3][1] U   1336    652     16
       1344   616        cutoff        2860898.4955  2549613.3366   341994   10.88%      y[9][7][1] U   1344    661     23
       1350   610        cutoff        2860898.4955  2554292.3969   347068   10.72%      y[6][8][2] R   1350    669     29
       1362   598        cutoff        2860898.4955  2565313.4587   351278   10.33%      y[1][0][0] L   1362    655     19
       1378   582        cutoff        2860898.4955  2592835.7596   355908    9.37%      y[8][3][2] D   1378    592     32
    

    but still one can observes that the heuristic is active!!!
    How to get rid of this?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: ineffective cut

    Posted Wed May 18, 2011 11:02 AM

    Originally posted by: SystemAdmin


    What makes you conclude that heuristics are still active?
    As far as I can see you only get solutions from nodes that are integral.
    The '*' indicates an integral solution while a solution from a heuristic is indicated by an additional '+' after the node number.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: ineffective cut

    Posted Wed May 18, 2011 11:10 AM

    Originally posted by: SystemAdmin


    Ok. you are right. I mixed * with +.
    But, this still does not answer my question and that is:

    why this solution does not come first in the cuttcallback? If I am not mistaking only a solution from heuristic goes directly to the incumbent callback and the rest have to pass the cutcallback before being installed as incumbent.
    So, why this solution does not pass the cutcallback?
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: ineffective cut

    Posted Wed May 18, 2011 11:25 AM

    Originally posted by: SystemAdmin


    Indeed, this sounds strange. How many threads are you using? Does the same thing happen in sequential mode?
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: ineffective cut

    Posted Wed May 18, 2011 11:27 AM

    Originally posted by: SystemAdmin


    I use only one single thread.
    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: ineffective cut

    Posted Wed May 18, 2011 11:40 AM

    Originally posted by: SystemAdmin


    Okay. Hard to tell what is going wrong. I cannot believe that this is a CPLEX issue, because what you describe is so basic that it has to have come up earlier. But one never knows...

    Is it possible to send a (preferably small) piece of code that reproduces the issue?
    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: ineffective cut

    Posted Wed May 18, 2011 11:48 AM

    Originally posted by: SystemAdmin


    Yeah, I don't really mean it is a cplex issue. But just wondering why this happens. Maybe I must also consider calling/implementing some thing between node callback and incumbent callback as well to capture the solutions which dont pass cut callback?!?!

    I don't mind to send the code but it is quite cumbersome to separate part of the project and make it smaller. because it basically depends on three other libraries (written by myself) to parse different data sets.
    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: ineffective cut

    Posted Wed May 18, 2011 03:18 PM

    Originally posted by: SystemAdmin


    Shahin: What I normally do is use an incumbent callback to both reject the incumbent and queue a cut, a branch callback that creates a single child node by adding the queued cut (but leaves it queued), and a cut callback that adds the cut when next called (and empties the queue). I've been advised that the branch callback should be unnecessary, but I have not tested my code without it, and your experience here has me wondering if the branch callback might really be necessary.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: ineffective cut

    Posted Wed May 18, 2011 03:27 PM

    Originally posted by: SystemAdmin


    Thanks Paul, nice and useful comments as always ;)
    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: ineffective cut

    Posted Wed May 18, 2011 03:36 PM

    Originally posted by: SystemAdmin


    I think we had a similar discussion some time in the past; a slightly different approach which makes me keen on using the cut callback is that I also have to generate such cuts from a fractional solution.

    perhaps, I should consider your approach. then I often cut even those integer ones in the cutcallback (before becoming incumbents) and also those which do not appear in cutcallback, in the incumbent in your way.
    #CPLEXOptimizers
    #DecisionOptimization


  • 12.  Re: ineffective cut

    Posted Wed May 18, 2011 05:34 PM

    Originally posted by: SystemAdmin


    The incumbent and branch callbacks will not interfere with cutting fractional solutions in the cut callback (the incumbent callback will not be called in that case, and the branch callback will see an empty cut queue). Something I forgot to mention is that the branch callback does nothing (lets CPLEX branch normally) if the cut queue is empty.

    Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization