gamma()
Returns floating point numbers according to a gamma distribution.
Synopsis
gamma(α, β)
Description
This function returns a variate of a gamma distribution.
This distribution is described at the link
http://www.cplusplus.com/reference/random/gamma_distribution/, and
produces random numbers can be interpreted as the aggregation
of α
exponential distributions, each with β
as parameter.
The function returns a single value for the current agent that is consistent with the distribution. Over a large number of agents, the returned values will collectively represent the specified distribution.
Parameters
α
A numeric expression representing the first input for the distribution.
β
A numeric expression representing the second input for the distribution.
Returns
Returns a floating point number consistent with a gamma distribution.
Examples
The following state will make entering agents collectively wait with a gamma distribution using
the parameters α = 5
and β = 1
. Each agent waits a random time, and collectively the
agents entering this state have wait times consistent with the gamma distribution formula.
state Test {
wait(gamma(5, 1))
next(Excluded)
}
See Also
bernoulli(), binomial(), cauchy(), chi_squared(), extreme_value(), fisher_f(), geometric(), gompertz(), lognormal(), negative_binomial(), normal(), poisson(), student_t(), uniform(), weibull()