public class PiecewiseLinearDistribution extends ContinuousDistribution
Meaning: | Distribution of a real random variable \(T = d \cdot (Z + Y)\), whereby
\(Z\) is an arbitrarily distributed integer number random variable, \(Y\) is
an uniformly distributed continuous random variable between 0 and 1 and \(d\)
is the scale factor. Application example: empirical distribution according to [1], whereby the distribution of \(Z\) is a known histogram |
---|---|
Parameters: |
|
PDF: | \(P(T=t) = f(t) = \frac{1}{d} \cdot \sum\limits_{n=0}^{\infty} p_n \cdot
(\sigma(t-nd) - \sigma(t- (n+1)d))\) whereby \(\sigma(x)\) represents the step function. |
Expected value: | \(E[T] = (E[N] + \frac{1}{2}) \cdot d\) |
Parser example: |
[...].Distribution = PiecewiseLinearDistribution
|
References: | A. M. LAW, W. D. KELTON: Simulation Modeling & Analysis, 2nd edition, McGraw- Hill, 1991. |
Modifier and Type | Field and Description |
---|---|
DiscreteDistribution |
noOfSlotsDist |
double |
slotDuration |
rng
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist,
double slotDuration) |
PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist,
double slotDuration,
RandomNumberGenerator rng) |
Modifier and Type | Method and Description |
---|---|
static PiecewiseLinearDistribution |
createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
as required by
ReflectionConstructable |
double |
next()
Create random numbers
|
getDefaultRNG, getRandomNumberGenerator, reset
public final DiscreteDistribution noOfSlotsDist
public final double slotDuration
public PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist, double slotDuration, RandomNumberGenerator rng)
public PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist, double slotDuration)
public static PiecewiseLinearDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
ReflectionConstructable
public double next()
ContinuousDistribution
next
in class ContinuousDistribution