Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Final Tableau of Simplex

    Posted Fri March 07, 2014 10:36 PM

    Originally posted by: Ragheb


    Hello every one

    I want to add some Gomory cuts to my LP relaxation and for that I need to have final tableau. 

    Someone can help me to know how to get the final tableau, I found CPXbinvarow() but I do not know how to use it.

    Thanks in advance


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Final Tableau of Simplex

    Posted Sat March 08, 2014 04:49 AM

    Originally posted by: T_O


    First of all, let's assume, you know the whole theory how to compute mixed-integer Gomory cuts for MIPs with arbitrary upper and lower bounds. Otherwise see e.g. this file.

    When I implemented a GMI cut separator, the following CPLEX functions were helpful:

    • CPXXgetbase: to get the basis variables and the statuses of the nonbasic variables
    • CPXXgetbhead: to get the order of the basis variables in the current basis
    • CPXXbinvrow and CPXXbinvarow: to obtain the whole tableau (we need both, as it might happen that slack/surplus/artifical variables are in the final nonbasis

    The documentation says:

    The routine CPXXbinvarow computes the i-th row of BinvA where Binv represents the inverse of the matrix B and juxtaposition specifies matrix multiplication. In other words, it computes the i-th row of the tableau.

    I think this is not completely correct, as slack/surplus/artifical variables can be in the final nonbasis (@CPLEX-Team: Please correct me, if I am off the track). What we really need is something like BinvA_N (N representing the nonbasis) which is not equivalent to BinvA.

    If you have got any further questions, please do not hesitate to ask.

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Final Tableau of Simplex

    Posted Sat March 08, 2014 12:18 PM

    Originally posted by: Ragheb


    Thanks a lot dear Thomas

    I appreciate the thesis.

    can you give me a simple example on how to use these functions...It has explained for Python but I couldnt find any on the manual for C++...

    Regards;

    Ragheb

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Final Tableau of Simplex

    Posted Sat March 08, 2014 12:38 PM

    Originally posted by: T_O


    Ragheb,

    these are plain C functions. You can use them in C++, I often do this. Depending on the C API you use (cplex.h or cplexx.h), the function names contain 1 or 2 X. I recommend the newer API (cplexx.h). I hope, your actual code is written using one of these APIs? (If it is written in Concert, we have a problem...)

    In my code, I do something like:

    CPXXbinvarow( env, lp, Binv[ ind ], foobar.data() )

    where env is my environment and lp my problem. Binv[ind] is the row that i want to obtain. foobar is a std::vector<double> that will contain the row of BinvA after the function call.

    The manual of CPXXbinvarow is here. You will also find the documentation of the other functions there.

    Best regards,
    Thomas


    #CPLEXOptimizers
    #DecisionOptimization