ikr.simlib.distributions.continuous

## Class GeneralDistribution

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

public class GeneralDistribution
extends ContinuousDistribution
General Distribution
Meaning: A distribution with a certain mean value $$\mu$$and coefficient of variation $$c$$ is generated by linking two phases (phase model) case I $$(c=0)$$: Only one phase with a constant distribution (mean value $$\mu$$). case II $$(0 < c < 1)$$: Serial switching of a constant distribution with the mean value $$m_1 = \mu \cdot c$$ and a negative-exponential distribution with the mean value $$m_2 = \mu \cdot (1-c)$$ case III $$(c=1)$$: Only one phase with a negative-exponential distribution (mean value $$\mu$$). case IV $$(c > 1)$$: Parallel switching of two phases with negative-exponential distributions and the parameters $$m_{1/2} = \frac{\mu}{1 \pm \sqrt{ \frac{c^2 -1}{c^2 +1} }}$$ (mean value) and $$p_{1/2} = \frac{1}{2} \cdot (1 \pm \sqrt{ \frac{c^2 -1}{c^2 +1} }$$ (branching probabilities). This corresponds to a hyperexponential distribution of 2nd order, its parameters fulfill the symmetry condition $$p_1 \cdot m_1 = p_2 \cdot m_2$$ mean value $$\mu > 0$$ coefficient of variation $$c \ge 0$$ case I: $$P(T=t) = f(t) = \delta(t - \mu)$$ case II: $$P(T=t) = f(t) = \frac{1}{m_2} \cdot exp( -\frac{t-m_1}{m_2} )$$ case III: $$P(T=t) = f(t) = \frac{1}{\mu} \cdot exp( -\frac{t}{\mu} )$$ case IV: $$P(T=t) = f(t) = \frac{p_1}{m_1} \cdot exp( -\frac{t}{m_1} ) + \frac{p_2}{m_2} \cdot exp( -\frac{t}{m2} )$$ $$E[T]= \mu$$ $$VAR[T]= (c \cdot \mu)^2$$ case I: $$\phi(s) = exp( -\mu s )$$ case II: $$\phi(s) = \frac{exp(-m_1 s)}{1+m_2 \cdot s}$$ case III: $$\phi(s) = \frac{1}{1+\mu \cdot s}$$ case IV: $$\phi(s) = \frac{p_1}{1+m_1 \cdot s} + \frac{p_2}{1+m_2 \cdot s}$$  [...].Distribution = General [...].Distribution.Mean = 2.3 [...].Distribution.CoefficientOfVariation = 1.5 
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
static class  GeneralDistribution.SubType
• ### Field Summary

Fields
Modifier and Type Field and Description
double branchingProbability
ContinuousDistribution distribution1
ContinuousDistribution distribution2
GeneralDistribution.SubType subType
• ### 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
GeneralDistribution(double mean, double coefficientOfVariation)
GeneralDistribution(double mean, double coefficientOfVariation, RandomNumberGenerator rng)
• ### Method Summary

Methods
Modifier and Type Method and Description
static GeneralDistribution 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

• #### distribution1

public final ContinuousDistribution distribution1
• #### distribution2

public final ContinuousDistribution distribution2
• #### subType

public final GeneralDistribution.SubType subType
• #### branchingProbability

public final double branchingProbability
• ### Constructor Detail

• #### GeneralDistribution

public GeneralDistribution(double mean,
double coefficientOfVariation,
RandomNumberGenerator rng)
• #### GeneralDistribution

public GeneralDistribution(double mean,
double coefficientOfVariation)
• ### Method Detail

• #### createInstance

public static GeneralDistribution 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