standardDeviation
Creates a constrained numeric expression equal to the standard deviation of the values of the variables in an array.
Syntax
floatExpr standardDeviation(intExprArray x, float meanLB = -inf, float meanUB = inf)
Parameters
-
x: an array of integer expressions. -
meanLB: a lower bound on the mean of the array. -
meanUB: an upper bound on the mean of the array.
Description
This function creates a new constrained numeric expression which is
equal to the standard deviation of the values of the variables in the
array x. The mean of the values of the variables in the array x is
constrained to be in the interval [meanLB, meanUB].
Example
a = intVar(0..100);
b = intVar(0..100);
c = intVar(0..100);
standardDeviation([a, b, c], 30, 30) <= 5;
The mean of the three variables a, b, c is constrained to be 30, and their standard deviation
must be less than or equal to 5.
Requirements
Array x cannot be empty.