Returns floating point numbers according to a gamma distribution.


gamma(α, β)


This function returns a variate of a gamma distribution. This distribution is described at the link, 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.



A numeric expression representing the first input for the distribution.


A numeric expression representing the second input for the distribution.


Returns a floating point number consistent with a gamma distribution.


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))

See Also

bernoulli(), binomial(), cauchy(), chi_squared(), extreme_value(), fisher_f(), geometric(), gompertz(), lognormal(), negative_binomial(), normal(), poisson(), student_t(), uniform(), weibull()