Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Can CPLEX calculate and output reduced cost of new column?

  • 1.  Can CPLEX calculate and output reduced cost of new column?

    Posted Fri March 25, 2016 11:45 AM

    Originally posted by: Perth2


    I am using CPLEX with Java in a column generation setup. I have a restricted master problem (RMP) that I solve as an LP. Then I use the duals to update the graph I am using as a sub problem to generate new columns to the RMP. I am not entirely sure that my pricing in the subproblem is correct, i.e. that I am calculating the reduced cost of new columns correctly. Is there any way to "feed" a new candidate column to CPLEX and make CPLEX calculate and output the reduced cost of the column prior to calling solve()? As far as I understand, CPLEX has an optimal simplex tableau for the previous solution and must calculate the reduced cost of the new column anyway, to determine if it is a candidate to enter the basis. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Can CPLEX calculate and output reduced cost of new column?

    Posted Fri March 25, 2016 10:10 PM

    Originally posted by: EdKlotz


    CPLEX uses the revised simplex method, so it does not maintain (or calculate) a complete simplex tableau, even at optimality.   CPLEX's C API has functions you can call (e.g CPXbinvarow, CPXbinvcol) that can generate any part of the simplex tableau relative to the basis at the end of the optimization (optimal or otherwise).   But, this functionality is not available in the object oriented APIs. such as Java.  However, you can have CPLEX calculate the reduced costs of the columns generated by your subproblem.   First, add them to the RMP.   Then set the simplex iteration limit to 0 and optimize.   The basis remains unchanged, so you can now query the reduced costs from the RMP for your recently added columns, and throw an exception if you see a mismatch of significant size in their values.   After that, be sure to reset the simplex iteration limit so that the subsequent optimization of the RMP can proceed.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Can CPLEX calculate and output reduced cost of new column?

    Posted Fri May 27, 2016 06:08 AM

    Originally posted by: Perth2


    Thanks, Ed. I did what you suggested, and it works, apart from the fact, that the value for the reduced cost that CPLEX calculates using the above method with setting the limit of iterations to 0, yields the negative value of what I am calculating myself from the sub problem graph. This seems very peculiar to me. I have other assertions in place in my code that check that columns in the basis have reduced cost = 0 and that columns outside of the basis have the same value for reduced cost calculated by CPLEX as calculated from the subproblem. These assertions are all working as expected. I have a maximizing problem and I am only accepting new columns from the subproblem if they have positive reduced cost. How can it then be that the reduced cost values that CPLEX calculates for these columns (using the above method) are negative?  Is this because CPLEX is actually solving a minimization problem behind the scenes or something like that?

     


    #CPLEXOptimizers
    #DecisionOptimization