Skip to content
Matthew Robinson edited this page Aug 7, 2016 · 2 revisions

Queue

The Queue procedure computes the total sojourn time distribution for the nth customer in an M/M/s queue, given that k customers are in the system at time 0. At a minimum, the procedure requires the user to specify X, the distribution of the time between arrivals, Y, the service time distribution and n, the total number of customers in the system. Both the interarrival and service time distributions must be exponential. Optional parameters include k, the number of customers initially in the queue and s, the number of parallel servers. If left unspecified, k will default to 0 and s will default to 1.

Syntax

Queue(X,Y,n,k=0,s=1)

Examples:

In [5]: X=ExponentialRV(Rational(1,3))

In [6]: Y=ExponentialRV(Rational(1,2))

In [7]: Q=Queue(X,Y,n=3,k=2,s=3)

In [8]: Q.display()
continuous pdf
for 0 <= x <= oo
---------------------------
                                -3x                       -x                        -3x 
                                ─────                      ───                       ─────
                                  2                         2                          2  
0.00103305785123967⋅(-9x - 9)⋅      + 0.512589218632607    - 0.0222717881292261     
---------------------------
Clone this wiki locally