Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Attributing Reduced Costs to LB/UB Constraints using the MATLAB CPLEX API

    Posted Wed February 02, 2011 11:18 PM

    Originally posted by: BerkUstun


    I'm currently trying to implement a version of Bender's Decomposition in MATLAB using the CPLEX API, though I'm having issues since I do not want to restrict my inputs to Standard Form LPs. Instead I would like to include LB/UB constraints for each of my variables. That is, I would like to solve the following model:

    min c'x
    s.t. Ax = b
    LB < x < UB

    My issue is that in order to implement my version of Bender's with such a model, I need to have distinct dual values for both my UB and LB constraints. The CPLEX API in MATLAB provides reducedcosts (Cplex.Solution.reducedcosts), which essentially correspond to these values, though it is not clear whether the reducedcosts can be attributed to the LB or the UB constraints (i.e. whether the variable is tight at the lowerbound or upperbound).

    I realize that there are ways around this with a manual check, but I was wondering whether there is any way that I can have Cplex spit out distrinct dual values for the UB or LB constraints? Or is there some other information that I can use that can solve the issue for me?
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Attributing Reduced Costs to LB/UB Constraints using the MATLAB CPLEX API

    Posted Thu February 03, 2011 11:15 AM

    Originally posted by: SystemAdmin


    > BerkUstun wrote:

    > My issue is that in order to implement my version of Bender's with such a model, I need to have distinct dual values for both my UB and LB constraints. The CPLEX API in MATLAB provides reducedcosts (Cplex.Solution.reducedcosts), which essentially correspond to these values, though it is not clear whether the reducedcosts can be attributed to the LB or the UB constraints (i.e. whether the variable is tight at the lowerbound or upperbound).
    >
    > I realize that there are ways around this with a manual check, but I was wondering whether there is any way that I can have Cplex spit out distrinct dual values for the UB or LB constraints? Or is there some other information that I can use that can solve the issue for me?

    AFAIK the only way to get dual values for bounds is through the reduced costs. I'm not familiar with the MATLAB interface, but I'm pretty sure what you are looking for is basis.colstat, which I suspect is the analog to IloCplex.getBasisStatuses in the Java API. The basis status of a bound variable should be one of basic (both duals are 0), lower (reduced cost gives dual for lower bound; dual for upper bound is 0) or upper (vice versa).

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Attributing Reduced Costs to LB/UB Constraints using the MATLAB CPLEX API

    Posted Sat February 05, 2011 02:54 AM

    Originally posted by: BerkUstun


    I think that colstat is the right property, though I'm still having an issue figuring out what it means. In the MATLAB interface, colstat only provides me with a Nx1 vector of 1s and 0s (where N is the number of variables in my LP). It does not give 'basic/upper/lower' classifications like in Java.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Attributing Reduced Costs to LB/UB Constraints using the MATLAB CPLEX API

    Posted Sat February 05, 2011 12:15 PM

    Originally posted by: SystemAdmin


    > BerkUstun wrote:
    > I think that colstat is the right property, though I'm still having an issue figuring out what it means. In the MATLAB interface, colstat only provides me with a Nx1 vector of 1s and 0s (where N is the number of variables in my LP). It does not give 'basic/upper/lower' classifications like in Java.

    Have you tried a small test problem where you know that at least one variable will hit its upper bound, at least one will hit its lower bound, and at least one will be basic? Maybe colstat has range {0, 1, 2} but you're only seeing 0 and 1 because one of those three statuses does not occur?

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Attributing Reduced Costs to LB/UB Constraints using the MATLAB CPLEX API

    Posted Mon February 07, 2011 05:37 AM

    Originally posted by: John Cui


    colstat in Cplex.Start have same meaning with callable functions interface, so you can query callable functions about basis as refenrence.

    John Cui
    #CPLEXOptimizers
    #DecisionOptimization