sum

Returns the sum of the input.

Syntax


floatExpr sum(floatExprArray x)
intExpr sum(intExprArray x)
cumulExpr sum(cumulExprArray x)

Parameters

  • x: an array of expressions (integer, floating-point or cumulative).

Description

The function sum computes the sum of x. Depending on the type of x the result is an integer expression, floating-point expression or cumulative epression.

Example


a = intVar(1..3);
b = intVar(1..3);
c = intVar(1..3);
c == sum([a,b]);