Topic
  • 2 replies
  • Latest Post - ‏2013-08-13T10:35:25Z by DanielJunglas
OBabat
OBabat
1 Post

Pinned topic Benders reformulation-adding cuts-callback

‏2013-08-12T18:19:33Z |

Hello,

I am reformulating a problem via Benders decomposition technique. It is a MIQP problem. To solve the problem to the optimality with this reformulation, I have to solve many MILP problems(master problems in Benders) iteratively to the optimality. To avoid great number of iteration, I want to add cuts to the problem while single MILP is running(without interrupting the solver). For example, finding a feasible solution and adding this cut to the CPLEX while it is solving single MILP to the optimality may decrease the total number of iterations and may help to decrease the total solution time. I understand that this can be done by using callback function. Could you correct me if I am wrong(fquestion is for the callback function, I am not asking for the technique)? If this can be done, is there anyway to do this in MATLAB environment or do I need to implement it in another environment like C++or Python?

Many thanks for your help.

Regards,

Onur

  • PaulRubin
    PaulRubin
    403 Posts
    ACCEPTED ANSWER

    Re: Benders reformulation-adding cuts-callback

    ‏2013-08-12T20:08:29Z  

    You have the right idea, and the callback you want to use is a lazy constraint callback.

    I'm not a MATLAB user, but I do not think you can do this through the MATLAB API. Looking at the docs, I see some sort of information callback, but no indications of any type of control callback. The answer in 2010 was that you could not use control callbacks then, and that seems to be true today. The C, C++, Java and Python APIs would all work.

    Paul

     

  • DanielJunglas
    DanielJunglas
    1623 Posts
    ACCEPTED ANSWER

    Re: Benders reformulation-adding cuts-callback

    ‏2013-08-13T10:35:25Z  
    • PaulRubin
    • ‏2013-08-12T20:08:29Z

    You have the right idea, and the callback you want to use is a lazy constraint callback.

    I'm not a MATLAB user, but I do not think you can do this through the MATLAB API. Looking at the docs, I see some sort of information callback, but no indications of any type of control callback. The answer in 2010 was that you could not use control callbacks then, and that seems to be true today. The C, C++, Java and Python APIs would all work.

    Paul

     

    Paul is right: As of version 12.5.1 control callbacks are not supported in matlab. They are supported in all other programming language APIs.

    You may want to take a look at the bendersatsp example shipped with CPLEX (the example exists for all programming languages). This example implements Benders decomposition my means of a lazy constraint callback.

  • PaulRubin
    PaulRubin
    403 Posts

    Re: Benders reformulation-adding cuts-callback

    ‏2013-08-12T20:08:29Z  

    You have the right idea, and the callback you want to use is a lazy constraint callback.

    I'm not a MATLAB user, but I do not think you can do this through the MATLAB API. Looking at the docs, I see some sort of information callback, but no indications of any type of control callback. The answer in 2010 was that you could not use control callbacks then, and that seems to be true today. The C, C++, Java and Python APIs would all work.

    Paul

     

  • DanielJunglas
    DanielJunglas
    1623 Posts

    Re: Benders reformulation-adding cuts-callback

    ‏2013-08-13T10:35:25Z  
    • PaulRubin
    • ‏2013-08-12T20:08:29Z

    You have the right idea, and the callback you want to use is a lazy constraint callback.

    I'm not a MATLAB user, but I do not think you can do this through the MATLAB API. Looking at the docs, I see some sort of information callback, but no indications of any type of control callback. The answer in 2010 was that you could not use control callbacks then, and that seems to be true today. The C, C++, Java and Python APIs would all work.

    Paul

     

    Paul is right: As of version 12.5.1 control callbacks are not supported in matlab. They are supported in all other programming language APIs.

    You may want to take a look at the bendersatsp example shipped with CPLEX (the example exists for all programming languages). This example implements Benders decomposition my means of a lazy constraint callback.