expectation(x) is the average of x over the model's scenarios: an
estimate of its expected value. It turns a random expression into a single
number, which can be used in the objective or in a constraint.
Arguments
- x
A random expression (see
is_random()).
Details
Minimizing an average makes the typical scenario good, and says little
about the bad ones; cvar() looks at those instead. For a vector x, each
element is averaged separately.