functionweibull1DON
Mapping a continuous input to a binary output through a Weibull distribution relation
Extends from Modelica.Icons.Function (Icon for functions).
Information
This function generates a random binary variable with a continuous inputs
x from a Weibull distribution relation.
The probability of being 1 is calculated from the input x from a
Weibull distribution relation with three predefined parameters u
(threshold, the output would be 0 if x is less than u),
L (normalization faction) and k (shape factor). Then
a random generator generates the output, which should be a binary variable.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | Continous variable | |
| Real | u | 1.0 | Parameter defining the Weibull distribution threshold |
| Real | L | 1.0 | Parameter defining the Weibull distribution normalization factor |
| Real | k | 1.0 | Parameter defining the Weibull distribution shape factor |
| Real | dt | 60 | Time step length |
| Integer[Modelica.Math.Random.Generators.Xorshift1024star.nState] | stateIn | State of the random number generator |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | y | Binary variable 0/1 | |
| 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. -
July 20, 2018, by Zhe Wang:
First implementation.