You may need to model non-deterministic processes, e.g. weather changing, product demand changing, or a random choice. Stochastic processes can be modeled using probability distributions.
AnyLogic comes with a large set of probability distributions. To obtain a random value, call the corresponding function, e.g. exponential( 0.6 ).
All AnyLogic distribution classes are implemented on the basis of the standard Java
java.util.Random
random number generator. However, if you wish to use your own one by default, you should call the
setDefaultRandomGenerator( java.util.Random gen )
static function of the
Utilities
class.
Using the following demo model you can explore different probability distributions supported by AnyLogic:
Demo model: Probability Distributions
AnyLogic supports the following probability distributions: