Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  How to simplify this formula

    Posted 10/07/14 04:37 AM

    Originally posted by: 2EH8_Bruno_Maffei


    Hi guys, is there anybody who knows how to simplify the following formula?

     int NofX = ...;
     range X = 1..NofX;  // with NofX = 225;

    dvar float+ Qt[X];

     subject to {

    Qt[5]+Qt[6]+Qt[7]+Qt[8]+......+Qt[99]+Qt[100]+Qt[101]+Qt[102] <= 1000;

    }

    I would like to sum from the Qt[5] to the Qt[102] variable (for instance) without the burden of writing almost 100 variables for just one equation.

    Thanks in advance for any help!!


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: How to simplify this formula

    Posted 10/07/14 05:25 AM

    Hi

    Qt[5]+Qt[6]+Qt[7]+Qt[8]+......+Qt[99]+Qt[100]+Qt[101]+Qt[102] <= 1000;

    can be rewritten into

    sum(i in 5..102) Qt[i] <= 1000;

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer