Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Sample Code for a valid inequality generated for mathematical programming

    Posted 10/08/13 06:29 PM

    Originally posted by: prasenjit mandal


    I have developed a valid inequality for my research work.

    But, I have no idea how to code it in C++ using cplex-C++ concert technology.

    I already  wrote a piece of code in C++ for the original problem.

    But I have no idea how to incorporate any generic cut generation to this problem.

     

    If anybody have a sample piece of code, please share it.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Sample Code for a valid inequality generated for mathematical programming

    Posted 10/09/13 11:43 AM

    Did you look at the many examples in C++ that come with CPLEX?

    Do you want to add your valid inequality before calling solve() or do you want to separate it dynamically (depending on the current solution)?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Sample Code for a valid inequality generated for mathematical programming

    Posted 10/12/13 05:58 PM

    Originally posted by: prasenjit mandal


    How could I find those examples in C++ that come with CPLEX?

    Actually, already I developed a code for LP relaxation of my IP problem. That piece of code provides a fractional solution.

    Now, I want to introduce a valid inequality to cut those fractional LP solution.

     

    Then, of course, I want to add the valid inequality before calling solve().

     

    Also, I am unaware of how to separate it dynamically! Could you please give me some idea about that.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Sample Code for a valid inequality generated for mathematical programming

    Posted 10/13/13 12:28 PM

    An example that dynamically adds user cuts is cplex/examples/src/cpp/iloadmipex5.cpp. This is also discussed in the user manual here.

    You may also want to consult the discussion of the cut callback in the user manual here.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: Sample Code for a valid inequality generated for mathematical programming

    Posted 06/06/16 09:57 AM

    Originally posted by: Jacko


    If you want to dynamically separate your cut you'll have to use a cut callback as you'll be adding the cuts on-the-go at every node of the Branch-and-Bound process. The callbacks are a way of dynamically interacting with node solutions and imposing violated cuts. You could either add them as local or global cuts and the choice of the callback depends on the type of cut you will be adding. Its worth mentioning that callbacks are declared before the .solve() and later (after the .solve()) verified at every node to determine whether one or several cuts are to be added as per your instructions. Notice this is the opposite to adding your valid inequalities a priori!!!!

     

    Note: I considered adding this post, in reply to a two and a half years old question, since it might still be valid to others and this is the type of information I would have liked to have with sommer guidelines on what to search for in the documentation (e.g. callbacks, types of callbacks) rather than trying to decrypt an example or having void answers as pointing to the general User Manual without any actual lead on what to look for.

     

     

    One is glad to be of service

    Y


    #DecisionOptimization
    #MathematicalProgramming-General