functionexponentialVariableGeneration
Random variable generator from the exponential distribution
Extends from Modelica.Icons.Function (Icon for functions).
Information
This function generates a random variable, from a exponentuial distribution with the input of mean
mu. The random variable might be the duration of a specific event, for instance the time to keep
the HVAC on.
The input mu denotes the mean value of the exponential distribution. Higher mu indicates a higher
chance to generate a larger output y.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | mu | Mean exponential distribution | |
| Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState] | stateIn | State of the random number generator |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y | Random number | |
| Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState] | stateOut | New state of the random number generator |
Revisions
-
December 6, 2024, by Michael Wetter:
Refactored implementation of random number calculations, transfering the local state of the random number generator from one call to the next.
This is for #4069. -
October 3, 2023, by Michael Wetter:
InitializedlocalSeed.
This is for #3549. -
July 20, 2018, by Zhe Wang:
First implementation.