Topic
3 replies Latest Post - ‏2013-10-13T16:28:17Z by DanielJunglas
prasenjit mandal
prasenjit mandal
7 Posts
ACCEPTED ANSWER

Pinned topic Sample Code for a valid inequality generated for mathematical programming

‏2013-10-08T22:29:13Z |

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.

  • DanielJunglas
    DanielJunglas
    92 Posts
    ACCEPTED ANSWER

    Re: Sample Code for a valid inequality generated for mathematical programming

    ‏2013-10-09T15:43:03Z  in response to prasenjit mandal

    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)?

    • prasenjit mandal
      prasenjit mandal
      7 Posts
      ACCEPTED ANSWER

      Re: Sample Code for a valid inequality generated for mathematical programming

      ‏2013-10-12T21:58:09Z  in response to DanielJunglas

      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.

      • DanielJunglas
        DanielJunglas
        92 Posts
        ACCEPTED ANSWER

        Re: Sample Code for a valid inequality generated for mathematical programming

        ‏2013-10-13T16:28:17Z  in response to prasenjit mandal

        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.