The OPTMODEL Procedure

SUM Aggregation Expression

SUM{ index-set } expression

The SUM aggregation operator evaluates the numeric expression expression for each member in the index set index-set. The result is the sum of the values that are returned by the expression. If the index set is empty, then the result is 0. This operator is analogous to the \sum operator that is used in mathematical notation. The following code demonstrates the use of the SUM aggregation operator:

  
    proc optmodel; 
       put (sum {i in 1..10} i);  /* outputs 55 */
 

Previous Page | Next Page | Top of Page