How can I express a sum of n variables where the output is bounded between two scalars?

19 Views Asked by At

How can I express a sum of n variables where the output is bounded between 0 and 10?

e.g.

x = n1 + n2 + n3 = 12 
12 > 10 
= 10 
1

There are 1 best solutions below

0
On BEST ANSWER

For example like this (I changed the notation a bit, because there would otherwise be two different $n$'s): $$ X = \max \left\{ \min \left\{ a_1 + a_2 + \ldots + a_n~, ~ 10\right\}~, ~0 \right\} $$