ikr.simlib.distributions.continuous.transform

Class PiecewiseLinearDistribution

• All Implemented Interfaces:
ReflectionConstructable, ReflectionConstructable3<SimNode,Parameters,RandomNumberGenerator>

public class PiecewiseLinearDistribution
extends ContinuousDistribution
Piece-wise Linear Distribution

Piece-wise Linear Distribution
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 scale factor/time slot duration $$d$$ discrete distribution $$p_i$$ of $$Z$$ / the number of time slots $$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. $$E[T] = (E[N] + \frac{1}{2}) \cdot d$$  [...].Distribution = PiecewiseLinearDistribution [...].Distribution.SlotDuration = 1.5 [...].Distribution.NoOfSlotsDist = Geometric [...].Distribution.NoOfSlotsDist.Mean = 9  A. M. LAW, W. D. KELTON: Simulation Modeling & Analysis, 2nd edition, McGraw- Hill, 1991.
• Field Summary

Fields
Modifier and Type Field and Description
DiscreteDistribution noOfSlotsDist
double slotDuration
• Fields inherited from class ikr.simlib.distributions.Distribution

rng
• Fields inherited from interface ikr.simlib.parameters.reflection.ReflectionConstructable

CREATE_INSTANCE_METHOD_NAME
• Constructor Summary

Constructors
Constructor and Description
PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist, double slotDuration)
PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist, double slotDuration, RandomNumberGenerator rng)
• Method Summary

Methods
Modifier and Type Method and Description
static PiecewiseLinearDistribution createInstance(SimNode ownNode, Parameters pars, RandomNumberGenerator rng)
double next()
Create random numbers
• Methods inherited from class ikr.simlib.distributions.Distribution

getDefaultRNG, getRandomNumberGenerator, reset
• Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• Field Detail

• noOfSlotsDist

public final DiscreteDistribution noOfSlotsDist
• slotDuration

public final double slotDuration
• Constructor Detail

• PiecewiseLinearDistribution

public PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist,
double slotDuration,
RandomNumberGenerator rng)
• PiecewiseLinearDistribution

public PiecewiseLinearDistribution(DiscreteDistribution noOfSlotsDist,
double slotDuration)
• Method Detail

• createInstance

public static PiecewiseLinearDistribution createInstance(SimNode ownNode,
Parameters pars,
RandomNumberGenerator rng)
• next

public double next()
Description copied from class: ContinuousDistribution
Create random numbers
Specified by:
next in class ContinuousDistribution