Learn R Programming

queueing (version 0.2.3)

NewInput.CJN: Define the inputs of a Closed Jackson Network

Description

Define the inputs of a Closed Jackson Network

Usage

NewInput.CJN(prob=NULL, n=0, z=0, operational=FALSE, method=0, tol=0.001, ...)
NewInput2.CJN(prob=NULL, n=0, z=0, operational=FALSE, method=0, tol=0.001, nodes)
NewInput3.CJN(n, z, numNodes, vType, vVisit, vService, vChannel, method=0, tol=0.001)

Arguments

Details

Define the inputs of a Closed Jackson Network. For a operational use, NewInput3.CJN is recommended. For a more academic use, NewInput.CJN or NewInput2.CJN is recommended. Please, note that the different ways to create the inputs for a Closed Jackson Network are equivalent to each other, and no validation is done at this stage. The validation is done calling CheckInput function.

References

[Sixto2004] Sixto Rios Insua, Alfonso Mateos Caballero, M Concepcion Bielza Lozoya, Antonio Jimenez Martin (2004). Investigacion Operativa. Modelos deterministicos y estocasticos. Editorial Centro de Estudios Ramon Areces. [Lazowska84] Edward D. Lazowska, John Zahorjan, G. Scott Graham, and Kenneth C. Sevcik (1984). Quantitative System Performance: Computer System Analysis Using Queueing Network Models. Prentice-Hall, Inc., Englewood Cliffs, New Jersey

See Also

QueueingModel.i_CJN

Examples

Run this code
## See example 11.13 in reference [Sixto2004] for more details.
## create the nodes
n <- 2
n1 <- NewInput.MM1(lambda=0, mu=1/0.2, n=0)
n2 <- NewInput.MM1(lambda=0, mu=1/0.4, n=0)

## think time = 0
z <- 0

## operational value
operational <- FALSE

## definition of the transition probabilities
prob <- matrix(data=c(0.5, 0.5, 0.5, 0.5), nrow=2, ncol=2, byrow=TRUE)

cjn1 <- NewInput.CJN(prob, n, z, operational, 0, 0.001, n1, n2)

cjn1 <- NewInput2.CJN(prob, n, z, operational, 0, 0.001, list(n1, n2))


## using visit ratios and service demands. See [Lazowska84] pag 117.
## E[S] cpu = 0.005, Visit cpu = 121, D cpu = E[S] cpu * Visit cpu = 0.605
cpu <- NewInput.MM1(mu=1/0.005)

## E[S] disk1 = 0.030, Visit disk1 = 70, D disk1 = E[S] disk1 * Visit disk1 = 2.1
disk1 <- NewInput.MM1(mu=1/0.030)

## E[S] disk2 = 0.027, Visit disk2 = 50, D disk2 = E[S] disk2 * Visit disk2 = 1.35
disk2 <- NewInput.MM1(mu=1/0.027)

## The visit ratios.
vVisit <- c(121, 70, 50)

operational <- TRUE

net <- NewInput.CJN(prob=vVisit, n=3, z=15, operational, 0, 0.001, cpu, disk1, disk2)

## Using the operational creation function
n <- 3
think <- 15
numNodes <- 3
vType <- c("Q", "Q", "Q")
vService <- c(0.005, 0.030, 0.027)
vChannel <- c(1, 1, 1)

net2 <- NewInput3.CJN(n, think, numNodes, vType, vVisit, vService, vChannel, method=0, tol=0.001)

Run the code above in your browser using DataLab