Decision Optimization

Decision Optimization

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

 View Only
  • 1.  How to add a cut?

    Posted Wed February 09, 2022 12:09 PM
    Dear all,
    I have a question about adding cuts to the model. Note that, I am programming in C#, but If you are using other frameworks and you know my answer, I will be happy to read how you do it. 

    I am trying to implement Branch, Cut and Price algorithm. Now I have a column-based master model using "range" and "column", and I solved it to optimality. Now I am trying to add cuts, but I do not know how to do it. What I am concerned about is, after adding the cuts, I do not want to optimize the model from the beginning, in fact, I want to reoptimize the model from the optimal point of the model without cuts. Briefly,
    1- How do you add a cut in the column-based model?
    2- When you re-optimize the model after adding cut, does it start from the beginning? 



    ------------------------------
    Babak Akbarzadeh
    ------------------------------

    #DecisionOptimization


  • 2.  RE: How to add a cut?
    Best Answer

    Posted Thu February 10, 2022 06:43 PM
    Edited by System Admin Fri January 20, 2023 04:41 PM
    In the C Callable library, you can use functions CPXaddrows (CPXcutcallbackadd if you are adding a cut from within a callback function) to add a row to the LP model.

    After adding a violated cut, the previous solution becomes infeasible. *As far as possible*, (subject to other constraints) CPLEX will try to use a previous existing basis. Usage of dual simplex optimizer will ensure that you do not restart from scratch after adding a new violated cut.

    This is similar to the case where you add a new column/variable. If you use the primal simplex algorithm, the current solution continues to remain feasible, although not  provably optimal yet. So, primal simplex algorithm can start from the pre-existing basis.

    To verify indeed that CPLEX is doing what you expect it to do (not restarting optimization from scratch) use function getNIterations after a call to the optimizer to find out how many iterations CPLEX took to reoptimize the basis. If CPLEX reoptimized the problem from start, you should see a relatively high number here.

    ------------------------------
    CPLEX User
    ------------------------------



  • 3.  RE: How to add a cut?

    Posted Fri February 11, 2022 11:08 AM
    Edited by System Admin Fri January 20, 2023 04:47 PM
    Hi, Thank you for sharing. 
    I have tried to add this function, and it worked. 


    ------------------------------
    Babak Akbarzadeh
    ------------------------------


    #DecisionOptimization