Package 'MG1StationaryProbability'

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

Help Index


Service continuous density distribution

Description

Service continuous density distribution

Usage

b(t)

Arguments

t

time value

Value

density function value (double) given t


The density of the sojourn time in state i with probability that

Description

The density of the sojourn time in state i with probability that

Usage

densityOfSojournTimeAtState_i(i, j, t, dt, m = c(0.2, 0.3), mMax = 14)

Arguments

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

Value

double

Examples

densityOfSojournTimeAtState_i(1, 0, 10, 1, m=c(1, 2), mMax=5)

Expectation of number of arriving claims depending on i and j

Description

Expectation of number of arriving claims depending on i and j

Usage

EN(i, j, t, m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

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

Value

double

Examples

EN(1, 1, 2)

Expectation of number of arriving claims

Description

Expectation of number of arriving claims

Usage

ENU(i, t)

Arguments

i

MC i-th state

t

time value

Value

double

Examples

ENU(1, 3)

Probability of the final state

Description

Probability of the final state

Usage

finalStateProbability(i, j, t, m = c(0.2, 0.3))

Arguments

i

MC i-th state

j

MC j-th state

t

time value

m

distribution parameters vector of sojourn times in alternating environment states

Value

double

Examples

finalStateProbability(0, 1, 10)

The mean intensity of the arrived flow

Description

The mean intensity of the arrived flow

Usage

flowIntensityMean(lambda = c(1, 2))

Arguments

lambda

Poisson flow intensity vector

Value

mean intensity value (double) of the arrived flow


Density of empty time for initial state i jointly with probability of final state j

Description

Density of empty time for initial state i jointly with probability of final state j

Usage

h(i, j, t, m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

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

Value

double

Examples

h(1, 1, 2, m = c(2.5, 0.2))

Load coefficient

Description

Load coefficient

Usage

loadCoefficient(m, lambda)

Arguments

m

distribution parameters vector of sojourn times in alternating environment states

lambda

Poisson flow intensity vector

Value

load coefficient value (double) of the arriving flow

Examples

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

Description

Mean sojourn time in the initial state i jointly with final probability of state j

Usage

meanSojournTimeWithFSP(i, j, t, m = c(0.2, 0.3))

Arguments

i

MC i-th state

j

MC j-th state

t

time value

m

distribution parameters vector of sojourn times in alternating environment states

Value

double

Examples

meanSojournTimeWithFSP(1, 0, 3)

Mean sojourn time in the initial state i (without final probability of state j)

Description

Mean sojourn time in the initial state i (without final probability of state j)

Usage

meanSoujournTime(i, t)

Arguments

i

MC i-th state

t

time value

Value

double

Examples

meanSoujournTime(0, 10)

Mean time of empty period in fixed state i

Description

Mean time of empty period in fixed state i

Usage

meanTimeEmptyFixed(i)

Arguments

i

MC i-th state

Value

complex


Mean time of busy period

Description

Mean time of busy period

Usage

meanTimeOfBusyPeriodETW(m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

m

distribution parameters vector of sojourn times in alternating environment states

lambda

Poisson flow intensity vector description

Value

complex


Mean time of busy period multiplied by load coefficient

Description

Mean time of busy period multiplied by load coefficient

Usage

meanTimeOfBusyPeriodEW(m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

m

distribution parameters vector of sojourn times in alternating environment states

lambda

Poisson flow intensity vector

Value

complex


Mean time of empty period given the stationary probability

Description

Mean time of empty period given the stationary probability

Usage

meanTimeOfEmptyPeriod()

Value

complex


Mean idle time if initial state i

Description

Mean idle time if initial state i

Usage

MET(i, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)

Arguments

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

Value

double

Examples

MET(1)

Mean empty time sojourn time in the initial state i during the empty period

Description

Mean empty time sojourn time in the initial state i during the empty period

Usage

MST(i, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)

Arguments

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

Value

double

Examples

MST(1)

Helper "not i" function

Description

Helper "not i" function

Usage

not_i(i = 0)

Arguments

i

MC i-th state

Value

2 if i = 0 and 1 if i = 1


The stationary probabilities of the environment state 0

Description

The stationary probabilities of the environment state 0

Usage

p0(m = c(0.2, 0.3))

Arguments

m

distribution parameters vector of sojourn times in alternating environment states

Value

stationary probability of the environment state 0 (double)

Examples

p0()

The stationary probabilities of the environment state 1

Description

The stationary probabilities of the environment state 1

Usage

p1(m = c(0.2, 0.3))

Arguments

m

distribution parameters vector of sojourn times in alternating environment states

Value

stationary probability of the environment state 1 (double)


Stationary probabilities for continuous time environment's state

Description

Stationary probabilities for continuous time environment's state

Usage

pi(m = c(0.2, 0.3))

Arguments

m

distribution parameters vector of sojourn times in alternating environment states

Value

double

Examples

pi()

Probability matrix calculation. Rows represent arriving probabilities at state i and columns represent the same for state j

Description

Probability matrix calculation. Rows represent arriving probabilities at state i and columns represent the same for state j

Usage

probabilitiesMatrix(
  i,
  j,
  m = c(0.2, 0.3),
  lambda = c(1, 2),
  tmax = 12,
  nmax = 5
)

Arguments

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

Value

matrix with nmax rows and columns


Probability of n arrival during time t jointly with final state j if initial state is i

Description

Probability of n arrival during time t jointly with final state j if initial state is i

Usage

probabilityOfNArrival(i, j, n, t, m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

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

Value

double

Examples

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)

Description

Probability of n arrival during time t (without joint probability of j)

Usage

probabilityOfNArrivalW(i, n, t, m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

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

Value

double

Examples

probabilityOfNArrivalW(1, 2, 3)

Probability to have state j in the ending of the idle period, if initially we have state i

Description

Probability to have state j in the ending of the idle period, if initially we have state i

Usage

PrTr(i, j, m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12)

Arguments

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

Value

double

Examples

PrTr(1, 0)

Resulting probabilities matrix calculation

Description

Resulting probabilities matrix calculation

Usage

resultingMatrix(m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5)

Arguments

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

Value

matrix with 2*nmax rows and columns


Service distribution function

Description

Service distribution function

Usage

serviceDistribution(t)

Arguments

t

time value

Value

service function value (double) given t


Stationary probability function

Description

Stationary probability function

Usage

stationaryProbabilities(m = c(0.2, 0.3), lambda = c(1, 2), tmax = 12, nmax = 5)

Arguments

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

Value

MC stationary probability vector


Stationary probability caching function

Description

Stationary probability caching function

Usage

stationaryProbabilities_cached(
  m = c(0.2, 0.3),
  lambda = c(1, 2),
  tmax = 12,
  nmax = 5
)

Arguments

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

Value

stationary probability vector cached


Stationary probabilities of the empty states in continuous time model

Description

Stationary probabilities of the empty states in continuous time model

Usage

stationaryProbabilitiesOfEmptyStates(i, m = c(0.2, 0.3), lambda = c(1, 2))

Arguments

i

MC i-th state

m

distribution parameters vector of sojourn times in alternating environment states

lambda

Poisson flow intensity vector

Value

complex