Title: | Modeling and Analysis of Stochastic Systems |
---|---|
Description: | Compute important quantities when we consider stochastic systems that are observed continuously. Such as, Cost model, Limiting distribution, Transition matrix, Transition distribution and Occupancy matrix. The methods are described, for example, Ross S. (2014), Introduction to Probability Models. Eleven Edition. Academic Press. |
Authors: | Carlos Alberto Cardozo Delgado |
Maintainer: | Carlos Alberto Cardozo Delgado <[email protected]> |
License: | GPL-3 |
Version: | 0.1.4 |
Built: | 2024-11-12 06:42:32 UTC |
Source: | CRAN |
ETCt
is used to obtain the Expected Total Cost vector up to t of a homogeneous continuous time Markov chain.
ETCt(R, c, t, epsilon = 0.001)
ETCt(R, c, t, epsilon = 0.001)
R |
numeric, represents the rate matrix of a CTMC. |
c |
vector, represents the costs of the states of a CTMC. |
t |
numeric, represents the length of time. |
epsilon |
numeric, represents the error bound of the approximation of M(t). Default value is 0.001. |
Carlos Alberto Cardozo Delgado <[email protected]>.
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
library(modesto) # A four states CTMC example R <- matrix(c(0,1,0,0,0, 1/72,0,1,0,0, 0,2/72,0,1,0, 0,0,3/72,0,1/2, 0,0,0,4/72,0),5,5,byrow=TRUE) ETCt(R,c(-80,-15,50,125,200),t=24,epsilon=0.001)
library(modesto) # A four states CTMC example R <- matrix(c(0,1,0,0,0, 1/72,0,1,0,0, 0,2/72,0,1,0, 0,0,3/72,0,1/2, 0,0,0,4/72,0),5,5,byrow=TRUE) ETCt(R,c(-80,-15,50,125,200),t=24,epsilon=0.001)
LimDist
is used to obtain the limiting distribution of a homogeneous continuous time Markov chain.
LimDist(X, rate, epsilon = 0.01, iter)
LimDist(X, rate, epsilon = 0.01, iter)
X |
matrix, represents a rate matrix of a CTMC or the transition probability matrix of the DTMC associated to the CTMC. |
rate |
boolean, if rate is equal to TRUE then the argument X represents the rate matrix of the CTMC. If rate is equal to FALSE then the argument X represents the probability transition matrix of the CTMC. |
epsilon |
numeric, represents the error of approximation. |
iter |
integer, represents the maximum of iterations. |
Carlos Alberto Cardozo Delgado <[email protected]>.
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
LRC
is used to obtain the Long-Run Cost Rate of a homogeneous continuous time Markov chain.
LRC(X, costs)
LRC(X, costs)
X |
matrix, represents the rate matrix of a CTMC. |
costs |
vector, represents the costs of the states of a CTMC. |
Carlos Alberto Cardozo Delgado <[email protected]>.
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
## Not run: library(modesto) # A five states CTMC example R <- matrix(c(0,1,0,0,0, 1/72,0,1,0,0, 0,2/72,0,1,0, 0,0,3/72,0,1/2, 0,0,0,4/72,0),5,5,byrow=TRUE) LRC(X=R,costs=c(-80,-15,50,125,200)) ## End(Not run)
## Not run: library(modesto) # A five states CTMC example R <- matrix(c(0,1,0,0,0, 1/72,0,1,0,0, 0,2/72,0,1,0, 0,0,3/72,0,1/2, 0,0,0,4/72,0),5,5,byrow=TRUE) LRC(X=R,costs=c(-80,-15,50,125,200)) ## End(Not run)
Mt
is used to obtain the Occupancy matrix of a homogeneous continuous time Markov chain for a period of time [0,t].
Mt(R, t, epsilon = 0.001)
Mt(R, t, epsilon = 0.001)
R |
numeric, represents the rate matrix of a CTMC. |
t |
numeric, represents the length of time. |
epsilon |
numeric, represents the error bound of the approximation of M(t). Default value is 0.001. |
Carlos Alberto Cardozo Delgado <[email protected]>.
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
library(modesto) # A five states CTMC example R <- matrix(c(0,1,0,0,0, 1/72,0,1,0,0, 0,2/72,0,1,0, 0,0,3/72,0,1/2, 0,0,0,4/72,0),5,5,byrow=TRUE) Mt(R,t=24,epsilon=0.005)
library(modesto) # A five states CTMC example R <- matrix(c(0,1,0,0,0, 1/72,0,1,0,0, 0,2/72,0,1,0, 0,0,3/72,0,1/2, 0,0,0,4/72,0),5,5,byrow=TRUE) Mt(R,t=24,epsilon=0.005)
Pt2
is used to obtain the transition matrix of a homogeneous continuous time Markov chain for a period of time of t.
Pt2(R, t, epsilon = 0.001)
Pt2(R, t, epsilon = 0.001)
R |
numeric, represents the rate matrix of a CTMC. |
t |
numeric, represents the length of time. |
epsilon |
numeric, represents the error bound of the approximation of P(t). Default values is 0.001. |
Carlos Alberto Cardozo Delgado <[email protected]>.
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
library(modesto) # A two states CTMC example Pt2(matrix(c(0,2,3,0),2,2,byrow=TRUE),t=0.7,epsilon=0.005) # A four states CTMC example R <- matrix(c(0,2,3,0,4,0,2,0,0,2,0,2,1,0,3,0),4,4,byrow=TRUE) Pt2(R,t=0.7,epsilon=0.005) # require(microbenchmark) # microbenchmark(Pt(R,t=0.7,epsilon=0.005),Pt2(R,t=0.7,epsilon=0.005),times=1000L)
library(modesto) # A two states CTMC example Pt2(matrix(c(0,2,3,0),2,2,byrow=TRUE),t=0.7,epsilon=0.005) # A four states CTMC example R <- matrix(c(0,2,3,0,4,0,2,0,0,2,0,2,1,0,3,0),4,4,byrow=TRUE) Pt2(R,t=0.7,epsilon=0.005) # require(microbenchmark) # microbenchmark(Pt(R,t=0.7,epsilon=0.005),Pt2(R,t=0.7,epsilon=0.005),times=1000L)
Pt
is used to obtain the transient probability distribution of a homogeneous continuous time Markov chain at a point of time t.
PXt(X0, R, t, epsilon = 0.001)
PXt(X0, R, t, epsilon = 0.001)
X0 |
numeric vector, represents the probability distribution of the initial state. |
R |
numeric, represents the rate matrix of a CTMC. |
t |
numeric, represents the length of time. |
epsilon |
numeric, represents the error bound of the approximation of P(t). Default values is 0.001. |
Carlos Alberto Cardozo Delgado <[email protected]>.
Ross, S, Introduction to Probability Models, Eleven Edition. Academic Press, 2014.
Kulkarni V, Introduction to modeling and analysis of stochastic systems. Second Edition. Springer-Verlag, 2011.
library(modesto) # A three states CTMC example R <- matrix(c(0,2,0,3,0,1,0,6,0),3,3,byrow=TRUE) X0 <- c(1,0,0) PXt(X0,R,t=0.5,epsilon=0.005) X0 <- c(0,0,1) PXt(X0,R,t=0.5,epsilon=0.005)
library(modesto) # A three states CTMC example R <- matrix(c(0,2,0,3,0,1,0,6,0),3,3,byrow=TRUE) X0 <- c(1,0,0) PXt(X0,R,t=0.5,epsilon=0.005) X0 <- c(0,0,1) PXt(X0,R,t=0.5,epsilon=0.005)
summary.modesto displays the summary of calculated quantities from an object of class 'modesto'.
## S3 method for class 'modesto' summary(object, ...)
## S3 method for class 'modesto' summary(object, ...)
object |
an object of the class 'modesto'. This object is returned from the call to LimDist() function. |
... |
other arguments. |
# A two states CTMC example model <-LimDist(matrix(c(0,2,3,0),2,2,byrow=TRUE),rate=TRUE,epsilon=0.005) summary(model)
# A two states CTMC example model <-LimDist(matrix(c(0,2,3,0),2,2,byrow=TRUE),rate=TRUE,epsilon=0.005) summary(model)