Re: Queueing Theory - Series and Recursive Functions
- To: mathgroup at smc.vnet.net
- Subject: [mg67914] Re: Queueing Theory - Series and Recursive Functions
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Wed, 12 Jul 2006 05:39:33 -0400 (EDT)
- Organization: The University of Western Australia
- References: <e887vd$91a$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <e887vd$91a$1 at smc.vnet.net>, "passwd9" <david at carter-hitchin.clara.co.uk> wrote: > I want to plot a 3d graph of the probability of the queue length of a > M/D/1 queue - the height of the surface will be the probability and > we'll have 'queue length' x and 'traffic intensity' rho in the 'x' and > 'y' directions. The problem is that there is no closed form for the > queue length probability function (at least as far as I know). This is > a recursive function definition and has x+1 terms for each queue length > x probability. It is defined as: > > Px = e^(-rho) ( ( Po + P1) (1/x!) * rho^x + P2 * (1 / (x-1)!) * > rho^(x-1) + ... + Px * rho + Px+1 ) > > Some initial condition say Po = 1 - rho is used to start things off. This expression appears to be inconsistent. Do you have a reference for the formula? > So can this function be coded up in Mathematica? I looked through the > master index for 'recursive' and > 'series' but I didn't find anything which looked applicable. At http://coe.ubc.ca/users/marty/bams501_04/mg1.pdf there are notes on M/G/1 queues, for which there is a similar recurrence: p[0] = 1 - r; rr[n_] = p[n] == (a[n-1] p[0] + Sum[a[n-j] p[j], {j, n-1}])/(1-a[0]) You can solve this as follows: Solve[Table[rr[n], {n, 5}], Table[p[n], {n, 5}]] // Simplify Note, however, that one can derive an integral expression for the desired coefficients. > If this > is too difficult, then I have computed a few values by hand (so I have > a 4 x 3 matrix of Px's for different x's and rho's) and I would like to > graph those, but again, all the information I found on Plot3D suggests > it only takes functions as inputs. Indeed -- that is what ListPlot3D is designed for. Cheers, Paul _______________________________________________________________________ Paul Abbott Phone: 61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) AUSTRALIA http://physics.uwa.edu.au/~paul