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
.
function exponentialVariableGeneration input Real mu "Mean exponential distribution"; input Integer globalSeed "Seed for the random number generator"; output Real y "duration of event"; end exponentialVariableGeneration;