booking_clerkMC: A function to simulate the harassed booking clerk Markov...

Description Usage Arguments Details Value References Examples

View source: R/booking_clerkMC.R

Description

Simulates the harassed booking clerk Markov chain with given arrival and service rates up to t.end. The state space is (C(t),X(t),Y(t)), where C(t) represents the status of the clerk, X(t) the number of people waiting, and Y(t) the number of calls waiting. C(t) is 0 if clerk is idle, 1 if clerk is serving a person and 2 if clerk is serving a call.

Usage

1
2
3
4
5
booking_clerkMC(personArrRate, 
                callArrRate,
                personServRate,
                callServRate,
                t.end)

Arguments

personArrRate

the person arrival rate.

callArrRate

the call arrival rate.

personServRate

the person service rate.

callServRate

the call service rate.

t.end

the time of the time period to be simulated i.e. (0,t.end).

Details

We assume that all given rates are finite and positive.

Value

Returns the matrix (t.hist, state.hist) containing the realisation of the chain.

References

Jones, O.D., R. Maillardet, and A.P. Robinson. 2009. An Introduction to Scientific Programming and Simulation, Using R. Chapman And Hall/CRC.

Examples

1
booking_clerkMC(3,6,5,8,1)

Example output

Loading required package: MASS
Loading required package: lattice
          time clerk people calls
1  0.000000000     0      0     0
2  0.008289401     1      0     0
3  0.072653176     1      0     1
4  0.207549460     1      1     1
5  0.384941728     1      1     2
6  0.408502307     1      1     3
7  0.613782788     1      0     3
8  0.630122743     1      0     4
9  0.669670688     1      0     5
10 0.828197309     2      0     4
11 0.850396772     2      0     3
12 0.879828963     2      0     4
13 0.907524651     2      0     5
14 0.921083536     2      0     4
15 0.942425174     2      1     4
16 1.023174815     2      1     5

spuRs documentation built on May 2, 2019, 12:44 p.m.

Related to booking_clerkMC in spuRs...