- Function Exponential(lowerbound, scale)
Exponential
The function Exponential
draws a random value from an exponential
distribution.
Exponential(
lowerbound ! (optional) numerical expression
scale ! (optional) numerical expression
)
Arguments
- lowerbound
A scalar numerical expression.
- scale
A scalar numerical expression \(> 0\).
Return Value
The function
Exponential
returns a random value drawn from a exponential distribution with lower bound lowerbound and scale scale.
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 Exponential
(lambda) returns
a random value drawn from a exponential distribution with rate
\(lambda = 1/scale\) and lower bound \(0\).
Graph
A graph with:
a histogram for 100.000 experiments of drawing from distribution
Exponential(0,1)
, andthe
DistributionDensity
forExponential(0,1)
Example
The code:
option seed := 1234 ;
_p_draw := Exponential( 0, 10 ) ;
_p_pointDensity := DistributionDensity( Exponential( 0, 10 ), 3 );
block where listing_number_precision := 6 ;
display _p_draw, _p_pointDensity ;
endblock ;
will produce
_p_draw := 4.948559 ;
_p_pointDensity := 7.408182 ;
in the listing file.
References
The
Exponential
distribution is discussed in full detail in Continuous Distributions of the Language Reference.