Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to write this constraint ?

    Posted 11/24/15 04:12 PM

    Originally posted by: Zoubeir


    I have a binary variables x_i that takes 0 or 1 for all i in {1,...n}.

    I have the following constraint:

    sum_{i=1}^sx A_i >= A,

    where sx = sum_{i=1}^n x_i, the number of ones in the vector x=(x_1,...,x_n)

     

    Is there a way to write this constraint?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: How to write this constraint ?

    Posted 11/25/15 03:32 PM

    I'm not sure it's the most efficient way, but one possibility is to introduce additional binary variables y_i (i in {1,...,n}). Constrain them with y_1 >= y_2 >= ... >= y_n and y_1 + ... + y_n = x_1 + ... + x_n. That will force y_1 = ... = y_sx = 1 and y_j = 0 for j > sx. Your constraint is now sum_{i=1}^n A_i * y_i >= A. (This assumes that the A_i are parameters, not variables.)


    #DecisionOptimization
    #MathematicalProgramming-General