Function Triangular(Shape, Minimum, Maximum)

# Triangular

The function Triangular draws a random value from a triangular distribution.

Triangular(
Shape,        ! (input) numerical expression
Minimum,      ! (optional) numerical expression
Maximum       ! (optional) numerical expression
)


## Arguments

Shape

A scalar numerical expression.

Minimum

A scalar numerical expression.

Maximum

A scalar numerical expression.

## Return Value

The function Triangular returns a random value drawn from a triangular distribution with shape Shape, lower bound Minimum and upper bound Maximum. The argument Shape must satisfy the relation $$0 < Shape < 1$$.

Note

The prototype of this function has changed with the introduction of AIMMS 3.4. In order to run models that still use the original prototype, the option Distribution_compatibility should be set to Aimms_3_0. The original function Triangular(a, b, c) returns a random value drawn from a triangular distribution with a lower bound a, likeliest value b and upper bound c. The arguments must satisfy the relation $$a < b < c$$. The relation between the arguments Shape and b is given by $$Shape = (b - a)/(c - a)$$.

See also

The Triangular distribution is discussed in full detail in Discrete Distributions of the Language Reference.