The previous blog post showed the formulas that are used in M/M/c queuing models, and finished by showing that we need an Excel formula for if we are going to use Excel to help us.
The previous blog entry also introduced us to
= the number of servers, and
= the average utilisation
Excel does have a function “Poisson” which is defined as
Poisson(x,mean,cumulative)
Where
x is the number of events ("servers" in queuing terminology)
mean is the expected numerical value ("servers in use" in queuing terminology)
cumulative is a Boolean value indicating whether to return the sum of the Poisson probability (TRUE) or the exact probability (FALSE)
So
Poisson(, , false) =
Poisson(, , true) =
Warning!!!!
The Microsoft help for poisson shows the cumulative formula using an incredibly poor image... They show the cumulative equation as:
That symbol isn't clear whether it is the bottom half of an , or . It is actually a however many websites have erroneously shown it as an , and therefore care should be taken to ensure that you use the cumulative poisson function of Excel correctly.
Back to our formula
Remember our target equation?
In Excel, we can use the psuedo-formula
=Poisson(,,false) * exp() /
Which (when written algebraically) is the following
*
We can simplify this to the following
Since
* = 1
We can reduce this further to the following
That’s the middle part of our equation.. so we're halfway there.
Stage 2
The second stage is achieved as follows:
In Excel, we can use another psuedo-formula
=Poisson(,,true) * exp()
Which is the following
*
Since is used in every part of that Sigma for every value for “n”, and doesn’t change, we can take it outside the sum and use it as a multiplier.
This changes the equation to:
* *
Also *
So we can reduce the equation to the following
But look carefully at the equation above. We need n=1 as the starting point of the sum, not n=0. We can achieve this by rewriting the above sum, but extract the n=0 point individually.
+
Since 0! = 1, and anything to the power of 0 = 1, this is the same as saying
1 +
Ah... I thought it was too easy
That very simple Excel formula of =Poisson(,,true) * exp() hasn't quite given us everything we needed. The SUM goes all the way to n=c however our original formula for the M/M/c queue only needed n=c-1. So we need to take that "top value" off of our nice Excel formula
=Poisson(,,true) * exp() -
Hang on. We've dealt with a formula like that already. We can re-use the lessons learnt in stage 1, to say that the Excel formula of
=Poisson(,,false) * exp()
When written algebraically, is the following
*
Simplified to the following
Reduced to
That's what we needed.
Put it all together
So in Excel
Stage 1 + Stage 2 - Stage 3
Poisson(,,false)*exp()/() + Poisson(,,true)*exp() - Poisson(,,false)*exp()
Is equal to
Ah, but.... The equation is all to the minus 1, and we haven't got that (yet). This is simply resolved.
The Excel formula of 1/(Poisson(,,false)*exp()/() + Poisson(,,true)*exp() - Poisson(,,false)*exp())
Is equal to
Now you have the "tricky" value, all other values in the M/M/c queuing theory are MUCH easier to calculate.
This may have appeared to be a long and tortuous route, but now we have proved it once, we never need to do it again... we can just use the Excel Poisson formula in our queuing models knowing exactly how it can be applied correctly.
Phew!