Title: | Computes Stationary Distribution for M/G/1 Queuing System |
---|---|
Description: | The idea of a computational algorithm described in the article by Andronov M. et al. (2022) <https://link.springer.com/chapter/10.1007/978-3-030-92507-9_13>. The purpose of this package is to automate computations for a Markov-Modulated M/G/1 queuing system with alternating Poisson flow of arrivals. It offers a set of functions to calculate various mean indices of the system, including mean flow intensity, mean service busy and idle times, and the system's stationary probability. |
Authors: | Olga Zoldaka [aut, cre] |
Maintainer: | Olga Zoldaka <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.2 |
Built: | 2025-03-03 03:32:34 UTC |
Source: | https://github.com/mashroommole/mg1stationaryprobability |
Service continuous density distribution
b(t)
b(t)
t |
time value |
density function value (double) given t
The density of the sojourn time in state i with probability that
densityOfSojournTimeAtState_i(i, j, t, dt, m = c(0.2, 0.3), mMax = 14)
densityOfSojournTimeAtState_i(i, j, t, dt, m = c(0.2, 0.3), mMax = 14)
i |
MC i-th state |
j |
MC j-th state |
t |
time value |
dt |
time increment |
m |
distribution parameters vector of sojourn times in alternating environment states |
mMax |
max number of addends in sums |
double
densityOfSojournTimeAtState_i(1, 0, 10, 1, m=c(1, 2), mMax=5)
densityOfSojournTimeAtState_i(1, 0, 10, 1, m=c(1, 2), mMax=5)
Expectation of number of arriving claims depending on i and j
EN(i, j, t, m = c(0.2, 0.3), lambda = c(1, 2))
EN(i, j, t, m = c(0.2, 0.3), lambda = c(1, 2))
i |
MC i-th state |
j |
MC j-th state |
t |
time value |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
double
EN(1, 1, 2)
EN(1, 1, 2)
Expectation of number of arriving claims
ENU(i, t)
ENU(i, t)
i |
MC i-th state |
t |
time value |
double
ENU(1, 3)
ENU(1, 3)
Probability of the final state
finalStateProbability(i, j, t, m = c(0.2, 0.3))
finalStateProbability(i, j, t, m = c(0.2, 0.3))
i |
MC i-th state |
j |
MC j-th state |
t |
time value |
m |
distribution parameters vector of sojourn times in alternating environment states |
double
finalStateProbability(0, 1, 10)
finalStateProbability(0, 1, 10)
The mean intensity of the arrived flow
flowIntensityMean(lambda = c(1, 2))
flowIntensityMean(lambda = c(1, 2))
lambda |
Poisson flow intensity vector |
mean intensity value (double) of the arrived flow
Density of empty time for initial state i jointly with probability of final state j
h(i, j, t, m = c(0.2, 0.3), lambda = c(1, 2))
h(i, j, t, m = c(0.2, 0.3), lambda = c(1, 2))
i |
MC i-th state |
j |
MC j-th state |
t |
time value |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
double
h(1, 1, 2, m = c(2.5, 0.2))
h(1, 1, 2, m = c(2.5, 0.2))
Load coefficient
loadCoefficient(m, lambda)
loadCoefficient(m, lambda)
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
load coefficient value (double) of the arriving flow
loadCoefficient(m = c(0.2, 0.3), lambda = c(1,2))
loadCoefficient(m = c(0.2, 0.3), lambda = c(1,2))
Mean sojourn time in the initial state i jointly with final probability of state j
meanSojournTimeWithFSP(i, j, t, m = c(0.2, 0.3))
meanSojournTimeWithFSP(i, j, t, m = c(0.2, 0.3))
i |
MC i-th state |
j |
MC j-th state |
t |
time value |
m |
distribution parameters vector of sojourn times in alternating environment states |
double
meanSojournTimeWithFSP(1, 0, 3)
meanSojournTimeWithFSP(1, 0, 3)
Mean sojourn time in the initial state i (without final probability of state j)
meanSoujournTime(i, t)
meanSoujournTime(i, t)
i |
MC i-th state |
t |
time value |
double
meanSoujournTime(0, 10)
meanSoujournTime(0, 10)
Mean time of empty period in fixed state i
meanTimeEmptyFixed(i)
meanTimeEmptyFixed(i)
i |
MC i-th state |
complex
Mean time of busy period
meanTimeOfBusyPeriodETW(m = c(0.2, 0.3), lambda = c(1, 2))
meanTimeOfBusyPeriodETW(m = c(0.2, 0.3), lambda = c(1, 2))
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector description |
complex
Mean time of busy period multiplied by load coefficient
meanTimeOfBusyPeriodEW(m = c(0.2, 0.3), lambda = c(1, 2))
meanTimeOfBusyPeriodEW(m = c(0.2, 0.3), lambda = c(1, 2))
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
complex
Mean time of empty period given the stationary probability
meanTimeOfEmptyPeriod()
meanTimeOfEmptyPeriod()
complex
Mean idle time if initial state i
MET(i, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)
MET(i, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)
i |
MC i-th state |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
double
MET(1)
MET(1)
Mean empty time sojourn time in the initial state i during the empty period
MST(i, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)
MST(i, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)
i |
MC i-th state |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
double
MST(1)
MST(1)
Helper "not i" function
not_i(i = 0)
not_i(i = 0)
i |
MC i-th state |
2 if i = 0 and 1 if i = 1
The stationary probabilities of the environment state 0
p0(m = c(0.2, 0.3))
p0(m = c(0.2, 0.3))
m |
distribution parameters vector of sojourn times in alternating environment states |
stationary probability of the environment state 0 (double)
p0()
p0()
The stationary probabilities of the environment state 1
p1(m = c(0.2, 0.3))
p1(m = c(0.2, 0.3))
m |
distribution parameters vector of sojourn times in alternating environment states |
stationary probability of the environment state 1 (double)
Stationary probabilities for continuous time environment's state
pi(m = c(0.2, 0.3))
pi(m = c(0.2, 0.3))
m |
distribution parameters vector of sojourn times in alternating environment states |
double
pi()
pi()
Probability matrix calculation. Rows represent arriving probabilities at state i and columns represent the same for state j
probabilitiesMatrix( i, j, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5 )
probabilitiesMatrix( i, j, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5 )
i |
MC i-th state |
j |
MC j-th state |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
nmax |
limitation for number of arriving claims |
matrix with nmax
rows and columns
Probability of n arrival during time t jointly with final state j if initial state is i
probabilityOfNArrival(i, j, n, t, m = c(0.2, 0.3), lambda = c(1, 2))
probabilityOfNArrival(i, j, n, t, m = c(0.2, 0.3), lambda = c(1, 2))
i |
MC i-th state |
j |
MC j-th state |
n |
number of arrivals |
t |
upper integration limit |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
double
probabilityOfNArrival(1, 0, 10, 3, m=c(0.5, 0.3), lambda=c(2, 1))
probabilityOfNArrival(1, 0, 10, 3, m=c(0.5, 0.3), lambda=c(2, 1))
Probability of n arrival during time t (without joint probability of j)
probabilityOfNArrivalW(i, n, t, m = c(0.2, 0.3), lambda = c(1, 2))
probabilityOfNArrivalW(i, n, t, m = c(0.2, 0.3), lambda = c(1, 2))
i |
MC i-th state |
n |
number of arrivals |
t |
time value |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
double
probabilityOfNArrivalW(1, 2, 3)
probabilityOfNArrivalW(1, 2, 3)
Probability to have state j in the ending of the idle period, if initially we have state i
PrTr(i, j, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)
PrTr(i, j, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)
i |
MC i-th state |
j |
MC j-th state |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
double
PrTr(1, 0)
PrTr(1, 0)
Resulting probabilities matrix calculation
resultingMatrix(m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5)
resultingMatrix(m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5)
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
nmax |
limitation for number of arriving claims |
matrix with 2*nmax
rows and columns
Service distribution function
serviceDistribution(t)
serviceDistribution(t)
t |
time value |
service function value (double) given t
Stationary probability function
stationaryProbabilities(m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5)
stationaryProbabilities(m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5)
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
nmax |
limitation for number of arriving claims |
MC stationary probability vector
Stationary probability caching function
stationaryProbabilities_cached( m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5 )
stationaryProbabilities_cached( m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5 )
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
tmax |
upper integration limit |
nmax |
limitation for number of arriving claims |
stationary probability vector cached
Stationary probabilities of the empty states in continuous time model
stationaryProbabilitiesOfEmptyStates(i, m = c(0.2, 0.3), lambda = c(1, 2))
stationaryProbabilitiesOfEmptyStates(i, m = c(0.2, 0.3), lambda = c(1, 2))
i |
MC i-th state |
m |
distribution parameters vector of sojourn times in alternating environment states |
lambda |
Poisson flow intensity vector |
complex