Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Benders Decomposition in OPL

    Posted Tue June 05, 2018 04:53 PM

    Originally posted by: open_ball


    Hi,

     

    I was wondering if it is possible to solve my model with Benders Decomposition in OPL without using any other language.  In the following link, it is stated that "Bender's decomposition is not built into CPLEX, so you will have to implement this algorithm yourself. However, the C++ and C APIs of CPLEX enable you to implement this technique. Users are urged to assess carefully whether they should use the C or C++ API."

    http://www-01.ibm.com/support/docview.wss?uid=swg21400072

     

    However, I am not quite sure if this is for the old version, because when I check the examples, there is a Benders mod file. Having said that when I go through that example, since it is not clear, I could not fully understand the implementation. I could not see where the feasibility and optimality cuts are generated and where the sub problem is created?

     

    If we are able to implement Benders in OPL, is there a better example to understand how to implement the algorithm in OPL.

     

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Benders Decomposition in OPL

    Posted Wed June 06, 2018 02:58 AM

    Hi,

    the technote is for older version.

    Since then, Benders was added to the product.

    See a pure OPL example in

    CPLEX_Studio128\opl\examples\opl\benders

    regards

    https://www.linkedin.com/pulse/how-opl-alex-fleischer/


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Benders Decomposition in OPL

    Posted Wed July 11, 2018 10:55 AM

    Originally posted by: Kamran_Sr


    Hi Alex,

     

    I have a question about benders example in Cplex. In this example, it seems to me that 3 different strategies (full, annotation with variables 1 by 1, annotation with blocks of variables) have been used.

     

    I was wondering if I want to apply benders decomposition to my own model I should do the same as this example, or I only need to choose one of these strategies?

     

    Because I couldn't find any description about the script used in this example, I got confused.

     

    Regards,

    Kamran


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Benders Decomposition in OPL

    Posted Thu June 07, 2018 02:56 PM

    Originally posted by: open_ball


    Hi Alex,

     

    Thanks for the answer. Is there a document including the detailed explanation about the implementation of the Benders in OPL? 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Benders Decomposition in OPL



  • 6.  Re: Benders Decomposition in OPL

    Posted Thu July 26, 2018 01:21 PM

    Dear Kamran,

     

    There are currently only two parameters to change change the tolerance of optimality and feasibility cuts.  https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.0/ilog.odms.studio.help/CPLEX/ReleaseNotes/topics/releasenotes127/newParameters.html.  So, no, it's not possible for you to interact with the Benders algorithm as you suggested.

     

    Best regards,

    Xavier


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Benders Decomposition in OPL

    Posted Mon August 06, 2018 10:17 AM

    Originally posted by: Kamran_Sr


    Dear Xavier,

     

    Thank you for your reply. Do you have any suggestion or resource that help me with applying any accelerated Benders using Cplex?

     

    Many Thanks,

    Kamran


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 8.  Re: Benders Decomposition in OPL

    Posted Sun December 02, 2018 08:53 PM

    Originally posted by: Amira Hijazi


    Hi Kamran.

     

    I was wondering how did you get your benders model to work using strategy 1 and the script for a block of variables:

    // use annotation with blocks of variables.
    // if partitioning is bad, then an error will be raised by CPLEX...
    var subCplex3 = new IloCplex();
    var subOpl3 = new IloOplModel(masterDef, subCplex3);
    subOpl3.addDataSource(masterElts);
    subOpl3.generate();
    subCplex3.bendersstrategy = 1;

    subCplex3.newLongAnnotation("cpxBendersPartition");

    subCplex3.setLongAnnotations("cpxBendersPartition", subOpl3.X, subOpl3.bendersPartition);
    subCplex3.solve();

     

    Did you add anything else to the model? I did the annotations and used this strategy but i keep getting an error "invalid benders decomposition" 

    Any advice?


    #DecisionOptimization
    #OPLusingCPLEXOptimizer