You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Empirical: `empirical(options)` where `options` is a `dict` of values to rates
14
18
15
19
Since the gamma distribution is a generalization of the Erlang distribution, the quite common Erlang distribution is also covered.
16
20
17
-
Note that the parameters for `log_normal` and `gamma` are mean (`mean`) and standard deviation (`sd`). So no manual converting from mean and standard deviation to $\mu$, $\sigma$, ... is needed.
21
+
Note that the parameters for `log_normal`, `gamma`and `erlang`are mean (`mean`) and standard deviation (`sd`). So **no** manual converting from mean and standard deviation to $\mu$, $\sigma$, ... is needed.
18
22
19
23
The generator functions will return strings containing lambda expressions. The strings are evaluated inside the stations on first usage. This is needed for serialization for multi-process simulation. If you do not want to use multi-process parallelization, you can also add the parameter `as_lambda=True` to get lambda expressions directly. The stations will understand both: strings and lambdas.
"""Generates a lambda expression or a string that can be evaluated to a lambda expression, with a pseudorandom number generator for the Erlang distribution
92
+
93
+
Args:
94
+
mean (float): Mean
95
+
std (float): Standard deviation
96
+
as_lambda (bool, optional): Should a lambda expression (True) or a string (False) be returned? Defaults to False.
97
+
98
+
Returns:
99
+
Union[str, Callable[[], float]]: Lambda expression or string with lambda expression for random number generator
"""Generates a lambda expression or a string that can be evaluated to a lambda expression, with a pseudorandom number generator for the uniform distribution
"""Generates a lambda expression or a string that can be evaluated to a lambda expression, with a pseudorandom number generator for the trapezoid distribution
149
+
150
+
Args:
151
+
a (float): Minimum value of the support
152
+
b (float): x value of the left side of the highest density
153
+
c (float): x value of the right side of the highest density
154
+
d (float): Maximum value of the support
155
+
as_lambda (bool, optional): Should a lambda expression (True) or a string (False) be returned? Defaults to False.
156
+
157
+
Returns:
158
+
Union[str, Callable[[], float]]: Lambda expression or string with lambda expression for random number generator
"""Generates a lambda expression or a string that can be evaluated to a lambda expression, with a pseudorandom number generator for the beta distribution
172
+
173
+
Args:
174
+
alpha (float): Alpha parameter of the beta distribution
175
+
beta (float): Beta parameter of the beta distribution
176
+
low (float): Minimum value of the support
177
+
high (float): Maximum value of the support
178
+
as_lambda (bool, optional): Should a lambda expression (True) or a string (False) be returned? Defaults to False.
179
+
180
+
Returns:
181
+
Union[str, Callable[[], float]]: Lambda expression or string with lambda expression for random number generator
"""Generates a lambda expression or a string that can be evaluated to a lambda expression, with a pseudorandom number generator for the half-normal distribution
193
+
194
+
Args:
195
+
low (float): Minimum value of the support
196
+
mean (float): Mean of the half-normal distribution
197
+
as_lambda (bool, optional): Should a lambda expression (True) or a string (False) be returned? Defaults to False.
198
+
199
+
Returns:
200
+
Union[str, Callable[[], float]]: Lambda expression or string with lambda expression for random number generator
"""Generates a lambda expression or a string that can be evaluated to a lambda expression, which returns a fixed number (which is a special case of a pseudorandom number generator)
0 commit comments