Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Max Min Ratio constraint in CPLEX

    Posted 03/28/19 03:41 AM

    Originally posted by: ORA17


    Hi Experts,

    I have below linear programming to solve:

    Max c1x1 +c2 x2 +c3 x3 + c4 x4

    S.T.

    MaxMin Ratio constraints : Max(ax1,bx2,cx3,dx4) / Min(ax1,bx2,cx3,dx4) >= b1

    General constraints :  x1+x2+x3+x4 = b2

    all x are binary

     

    How can I model this constraint in CPLEX?

     

    Thank you.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Max Min Ratio constraint in CPLEX

    Posted 03/28/19 03:57 AM

    What programming API do you use? Do you use OPL?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Max Min Ratio constraint in CPLEX

    Posted 03/28/19 05:20 AM

    Originally posted by: ORA17


    Hi Daniel,

    I am using .NET concert Technology. I don't use OPL.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Max Min Ratio constraint in CPLEX

    Posted 03/28/19 01:55 PM

    You can rewrite the constraint as

    Max(ax1,bx2,cx3,dx4) >= b1 * Min(ax1,bx2,cx3,dx4)

    and then use IloCplex.Max() and IloCplex.Min() to model the max and min expressions.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Max Min Ratio constraint in CPLEX

    Posted 03/29/19 03:16 AM

    Originally posted by: ORA17


    Hi Daniel @danielJunglas ,

    Is it possible to get maxmin ratio for variables with solution 1 with the approach you have suggested?

     

    Kindly refer below example:

    Max 54 x1 + 10 x2 + 51 x3 + 95 x4

    S.T.

    x1 + x2 + x3 + x4  = 2

    Max(54 x1 , 10 x2 , 51 x3 , 95 x4) <= 6 Min(54 x1 , 10 x2 , 51 x3 , 95 x4)

     

    because, if we only consider variables with solution 1 then  constraints becomes Max(95,51) <= 6 * min(95,51)

    but if we consider all variables then solution does not exist as constraints becomes Max(95,51,0,0) <= 6 * min(95,51,0,0)

     

    Kindly advice.


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Max Min Ratio constraint in CPLEX

    Posted 04/15/19 04:20 AM

    And what should happen if all variables in the min expression become 0? Then your expression is undefined again.

    Assuming that you can guarantee that at least one variable is non-zero then you could replace min(54 x1, 10, x2, ...) by min (54 x1 +  M*(1-x1), 10 x2 +  M*(1-x2), ...) where M is a number that is bigger than all the coefficients.


    #CPLEXOptimizers
    #DecisionOptimization