Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only

Odd dual values from CPLEX LP solver

  • 1.  Odd dual values from CPLEX LP solver

    Posted 01/21/16 10:42 PM

    Originally posted by: FaisalK


    Hi,

    I am implementing Benders decomposition to solve a MIP so I need to get the dual values of the slave LP.

    I use CPLEX with MATLAB and as a first step I always do the GAMS code as it is easy to debug and then the MATLAB CPLEX code. I found out that all the dual values provided by CPLEX code are just the negative values of the values provided by GAMS (definitely GAMS values are the correct one). And of course the values of primal decision variables for both GAMS and CPLEX codes are same as well as the objective function value. Then I decided to solve a trivial problem (not related to the original problem I am working on at all) to see why this is happening, the trivial problem is: 

    min 4x11+5x12+3x13+3x21+2x22+6x23

    s.t.

    x11+x12+x13<=65

    x21+x22+x23<=0

    x11+x21>=15

    x12+x22>=30

    x13+x23>=20

    x>=0.

    The dual values obtained from CPLEX are 0,3,4,5,3; however using GAMS the values are 0,-3,4,5,3!!!! But note that the optimal values of the primal decision variables are exactly the same.

    This is the last part of the MATLAB code that I used:

    [X,val,Exitflag,OutPut,status]=cplexlp(Obj,Aineq,bineq,Aeq,beq,zeros(1,length(Obj)),inf*ones(1,length(Obj)));

    Dual=status.ineqlin;

     

    Why the value of the second dual variable was the same except for the sign??!!

    Thanks for your time.

     

    Regards,

    Faisal

     


    #CPLEXOptimizers
    #DecisionOptimization