Decision Optimization

 View Only
  • 1.  Cplex/python for Benders with callbacks

    Posted Thu July 23, 2020 12:05 PM
    Hello,
    I am new to cplex and i would like to implement a benders decomposition with callbacks using the python API for a certain problem. 
    I have taken a look at the example bendersatsp.py and tried to adapt it to my problem but it did not work. As I do not know how these callbacks work, I have troubles correcting my code.
    I have been looking for other examples but i did not find many ones. I have also looked for a documentation which explains in detail these callbacks (linked to benders) and the associated methods but all i found was little documentations which did not allow me to understand enough.

    Therefore my question is : do you have any nice and complete piece of documentation which I could use ? Or a blog or anything were I could learn more about these callbacks? Or do you have other examples of code which could also help me to understand?

    Thank's a lot,
    Louis

    ------------------------------
    Louis Marot
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Cplex/python for Benders with callbacks

    Posted Fri July 24, 2020 02:09 AM
    In order to do a Benders decomposition with callbacks you have to dynamically find and add optimality and feasibility cuts. These are linear constraints and from CPLEX's point of view they are lazy constraints. You can take a look at CPLEX > User's Manual for CPLEX > Advanced programming techniques > User-cut and lazy-constraint pools in the manual to learn more about user cuts and lazy constraints. In the same section (advanced programming techniques) you can also find details about callbacks in CPLEX.

    With this under your help, you can hopefully understand better how callbacks and these examples work in detail. In general, the callbacks in the Benders examples just take a proposed feasible solution and separate Benders cuts from it.

    In case you still have trouble, could you provide more details about where exactly you are stuck?

    ------------------------------
    Daniel Junglas
    ------------------------------