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.
function weibullVariableGeneration extends Modelica.Icons.Function; input Real lambda "Parameter defining the Weibull distribution scale factor"; input Real k "Parameter defining the Weibull distribution shape factor"; input Integer globalSeed "Seed for the random number generator"; output Real y "Random variable generated from Weibull Distribution"; end weibullVariableGeneration;
localSeed
.