Distribution¶
-
class
NetworkSim.simulation.tools.distribution.
Distribution
(seed, model=None)[source]¶ Distribution class to generate interarrival time based on the chosen distribution.
- Parameters
model (Model, optional) – The network model used for simulation, containing network constants.
seed (int, optional) – The randomisation seed. Default is
0
.
-
get_pareto_parameters
()[source]¶ Calculation of Pareto distribution parameters.
Pareto distribution could be described by the pdf 1:
\[f(x) = \frac{ba^b}{x^{b+1}}\]where \(a\) is the position parameter and \(b\) is the shape parameter.
The Hurst parameter is given by 2:
\[H = \frac{3 - b}{2}\]- Parameters
hurst_parameter (float, optional) – The Hurst parameter for the Pareto distribution. Default is
0.8
2. However, this parameter is not in use currently as the average bit rate is used to calculate the shape parameter.- Returns
position_parameter (float) – The position parameter.
shape_parameter (float) – The shape parameter.
References
-
get_poisson_parameters
()[source]¶ Calculation of Poisson distribution parameters,
The interarrival time distribution follows a biased exponential distribution 3:
\[ \begin{align}\begin{aligned}f_T(t) = 0 \quad t<a\\f_T(t) = b \exp(-b(t-a)) \quad t \geq a\end{aligned}\end{align} \]where \(a\geq 0\) is the position parameter and \(b>0\) is the shape parameter.
For a source with average rate \(\lambda_a\) and burst rate \(\sigma\):
\[ \begin{align}\begin{aligned}\frac{1}{\lambda_a} = a + \frac{1}{b}\\b = \frac{\sigma \lambda_a}{\sigma - \lambda_a}\end{aligned}\end{align} \]- Returns
interarrival – A list of interarrival time in ns.
- Return type
list
References
- 3
Gebali, F., 2008. Analysis of computer and communication networks. Springer Science & Business Media.
-
pareto
()[source]¶ Pareto distribution variate generation.
- Returns
- Return type
A new interarrival time calculated from the Pareto distribution.