functionweibullVariableGeneration
Random variable generator from the Weibull distribution
Extends from Modelica.Icons.Function (Icon for functions).
Information
This function generates a random variable, from a Weibull distribution with the
inputs of lambda and k. The random variable might be
the duration of a specific event, for instance the time to keep the HVAC on.
The inputs lambda and k defines the probability density
function. lambda is similar to the mean value of exponential
distribution, and k defines the shape. A value of k = 1
means the Weibull distribution reduces to an exponential distribution. Genrally
speaking, higher lambda and higher k indicate a higher
chance to generate a higher output.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | lambda | Parameter defining the Weibull distribution scale factor | |
| Real | k | Parameter defining the Weibull distribution shape factor | |
| Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState] | stateIn | State of the random number generator |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y | Random variable generated from Weibull Distribution | |
| 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.