public class UniformDistribution extends ContinuousDistribution
Meaning: | All (continuous) values \(t\) in the interval \(b_l < t < b_u\) appear with the same probability |
---|---|
Parameters: |
|
PDF: | \(P(T=t) = f(t) = \begin{cases} \frac{1}{b_u -b_l} &\mbox{for } b_l \le t \le b_u \\ 0 &\mbox{else } \end{cases}\) |
DF: | \(P(T \le t) = F(t) = \begin{cases} 0 &\mbox{for } t < b_l \\ \frac{t-b_l}{b_u-b_l} &\mbox{for } b_l \le t < b_u \\ 1 &\mbox{for } t \ge b_l \end{cases} \) |
Expected value: | \(E[T]= \frac{b_l + b_u}{2}\) |
Variance: | \(VAR[T]= \frac{(b_u - b_l)^2}{12}\) |
Coefficient of variation: | \(c_T= \frac{1}{\sqrt{3}} \cdot \frac{b_u-b_l}{b_u+b_l}\) |
LST: | \(\phi(s) = \frac{1}{b_u-b_l} \cdot \frac{exp(-b_l s) - exp(-b_u s)}{s}\) |
Parser example: |
[...].Distribution = Uniform
|
Modifier and Type | Field and Description |
---|---|
double |
interval |
double |
lowerBound |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
UniformDistribution(double lowerBound,
double upperBound) |
UniformDistribution(double lowerBound,
double upperBound,
RandomNumberGenerator rng) |
Modifier and Type | Method and Description |
---|---|
static UniformDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
double |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public UniformDistribution(double lowerBound, double upperBound, RandomNumberGenerator rng)
public UniformDistribution(double lowerBound, double upperBound)
public static UniformDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public double next()
ContinuousDistribution
next
in class ContinuousDistribution