Decision Optimization

Decision Optimization

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

 View Only
  • 1.  cuts generated during the process via callback

    Posted Thu February 22, 2018 05:57 PM

    Originally posted by: shan_980


    I am using CPLEX C concert technology to optimize MIP problem. I generate the user cuts during the process via callback, the cuts must be added collectively  and cannot be ignored. But I find some cuts that are added to the relaxation but then removed, which result in a wrong result. Can anybody tell me is there any way to add all of the cuts that I generate. 

    Thank you


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: cuts generated during the process via callback

    Posted Fri February 23, 2018 01:28 AM

    If your cuts are required for correctness then you are probably doing something wrong. In general cuts are not allowed to cut off feasible solutions. You probably want to use lazy constraints instead of cuts, see here for an explanation of the difference.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: cuts generated during the process via callback

    Posted Fri February 23, 2018 10:43 AM

    Originally posted by: shan_980


    Thank you for your kind reply.

    The cuts will not cut off the feasible solutions if these cuts add to model together. I generate several cuts once, these cuts as a whole can cut off fractional point. So is there a way to add several cuts as a whole? these cuts and can be ignored after that. I think these cuts is not lazy constraint because I think they do not cut off integer point.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: cuts generated during the process via callback

    Posted Fri February 23, 2018 10:54 AM

    If you want to force CPLEX to accept the cuts then you can use the 'purgeable' parameters of the callback's add function. The default however already is to force cuts. So I wonder how you detect that CPLEX does not use your cuts?

    In order to add multiple cuts from one callback invocation just call add() multiple times.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: cuts generated during the process via callback

    Posted Fri February 23, 2018 11:06 AM

    Originally posted by: shan_980


    Thank you!

    I set 'purgeable' to CPX_USECUT_FORCE. I find that I generate 55 cuts via callback, but at the end of log, cplex show that the number of user cuts applied is 37. I find the reason why I set 'purgeable' to CPX_USECUT_FORCE from this forum, they said the cuts just add to relax problem, but still can be ignored by cplex. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: cuts generated during the process via callback

    Posted Tue February 27, 2018 06:04 AM

    Originally posted by: AndreaTramontani


    Hello,

    about CPLEX not adding user cuts, if you set purgeable = CPX_USECUT_FORCE then CPLEX will add all your cuts to the problem, without even checking if the cut is violated or not
    by the solution of the current relaxation. So, in particular, CPLEX will add even non-violated cuts.

    But there is one exception: CPLEX filters duplicate cuts anyway, and it will not add two identical cuts to the problem.
    In particular:
    1. If in the same call of the usercut callback you add two cuts that are (almost, according to some numerical tolerance) identical, then CPLEX will consider only the first one.
    2. If you add a cut (almost) identical to a cut already in the current relaxation, CPLEX will not add the cut. This can happen only if the cut you try to add
       is not violated by the current solution x of course, because all cuts in the current LP relaxation are not violated by x.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: cuts generated during the process via callback

    Posted Mon March 05, 2018 12:43 PM

    Originally posted by: shan_980


    Thank you


    #CPLEXOptimizers
    #DecisionOptimization