Example: tourism industry

Erlang B and Engset formula calculation - gvs.rs

Erlang B and Engset formula calculationVeljkovic SrdjanNovember IntroductionErlang B formula calculates the probability of loss for offered traffic on a number of lines ( traffic carriers ).Pragmatically, Erlang B formula gives, for a number of (phone) calls which have to betransported via a number of voice paths (channels), probability that a call will fail (there willbe no free channels). Erlang B formula presumes an infinite number of sources for the traffic, and that a failedcall will not influence the traffic. These presumptions are presumption is appropriate when the number of sources is much larger than thenumber of channels (it is said over 8 times larger , but we do not know the source of suchclaims).

Erlang B and Engset formula calculation Veljkovic Srdjan November 2010. 1 Introduction Erlang B formula calculates the probability of loss for offered traffic on a number of “lines”

Tags:

  Anglers

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Erlang B and Engset formula calculation - gvs.rs

1 Erlang B and Engset formula calculationVeljkovic SrdjanNovember IntroductionErlang B formula calculates the probability of loss for offered traffic on a number of lines ( traffic carriers ).Pragmatically, Erlang B formula gives, for a number of (phone) calls which have to betransported via a number of voice paths (channels), probability that a call will fail (there willbe no free channels). Erlang B formula presumes an infinite number of sources for the traffic, and that a failedcall will not influence the traffic. These presumptions are presumption is appropriate when the number of sources is much larger than thenumber of channels (it is said over 8 times larger , but we do not know the source of suchclaims).

2 If this presumption doesn t hold, you should use Engset formula , detailed in presumption is appropriate when the rate of call failure is low. If this presumptiondoesn t hold, you should use Extended Erlang B formula , which is actually an algoritam,detailed in section a detailed description of these terms you should read some book on traffic If there is B there must be CErlang C formula also exists, and is used if the failed call is put on hold/wait , until a channelis released. The crude presumption here is that the call will wait indefinetely , if it is not so,other methods/formulas are shall not deal with Erlang C formula further in this Erlang B formulaUnfortunately, there are no general rules for naming the values in traffic theory, so we shalluse our own.

3 Erlang B formula is:1pg=skk!k i=0sii!(1)with following meanings:pgprobability of call failure ( loss )soffered traffic in Erlangs (number of simultaneous calls)knumber of channels to carry the traffic (calls) CalculationErlang B formula uses factorial, so it can t be applied as is in todays computers for a largerk, because factorial for such numbers will be to big or to slow to , Erlang B formula can be interpreted to give a relation between three parameters. Itis often of interest to calculate one of the two input parameters of Erlang B formula , usingthe other input parametar and the result. If we know the offered traffic, we can determine thenumber of channels needed for that traffic for a given probability of loss.

4 Also, if the numberof channels is imposed by the environment, we can determine maximum possible traffic for agiven probability of Recursive calculation of Erlang B formulaThis calculation is widely known. The idea is that, for the same traffic, we can calculatethe result for a number of channels if we know the results for a number smaller by 1. It isconvinient to use the inverse formula in these i=0sii!skk!=k!skk i=0sii!=k i=0k!sksii!1pg=k i=0k!sk ii!(2)1pg(k+ 1)=k+1 i=0(k+ 1)!sk+1 ii!=(k+ 1)!(k+ 1)!+k i=0(k+ 1)!sk+1 ii!= 1 +k+ 1sk i=0k!sk ii!1pg(k+ 1)= 1 +k+ 1s1pg(k)(3)Initial value - fork= 0, is calculated directly from 2:1pg(0)=0!

5 S00!= 1 This gives us the following algorithm in the Ruby programming language:2def erlangb(s, k)r = (k) { |j| r = 1 + r*j/s }return / rendThis is code to ilustrate the algorithm, not for industrial Calculate number of channel by bisectionTo calculate the number of channels, we use the fact that, for a constant traffic,pgis adecreasing function (askgrows larger,pggrows smaller). This is intuitive, for more channels,the losses are smaller. Yet, it can be we give the prof of Quiao and Quiao, in an article than can be found on the Internet: ~qiao/publications/ and Quiao give a different recursive Erlang B formula then ours.

6 There is nodetailed description how the formula was generated, so we can t tell if there is some error, orthe difference can be discarded in real world , their proof thatpgis constantly decreasing is sound. We shall re-tell it here:pg(k+ 1) =sk+1(k+ 1)!k+1 i=0sii!=sk+ 1skk!1 +k+1 i=1sii!<skk!k+ 1sk+1 i=1sii!=skk!k+ 1sk i=0si+1(i+ 1)!==skk!k i=0(k+ 1i+ 1sii!)<skk!k i=0sii!=pg(k)Plainly :pg(k+ 1)< pg(k)Since we know that the function is decreasing, we can use the bisection method. All weneed are two values ofpg(k), one smaller and one larger than the givenPg- actually we needto valueskfor which that is shall start with 0 and the offered traffic as start values fork.

7 Buf, ifpg(s)< Pg, weneed suchk > sfor whichpg(k)> and Quiao suggest, without a sound reason (they simply state we found it to bethe best solution ) to increase the traffic in steps of 32, until we find suchk. We think that 32is a magic number here, as it is unclear why it should be a good number for traffic greaterthan, say, 1000E. So we use a different think that it is better to use a factor, instead of a step, becaus a factor will makethe calculation dependent of the offered traffic. We thing that the factor of is good. The3losses have to be very low for you to need 50% more channels than the offered traffic.

8 Suchlow losses are rarely needed, but if they are, additional steps will find the can now show the algorithm in the Ruby programming chan_erlangb(p_g, s)l, r = 0, erlangb(s, r) > p_gl = rr = 1 + (r * 3) / 2endmid = 0while (r-l) > 1mid = (l+r+1)/2if erlangb(s, mid) > p_gl = midelser = midendendreturn rendAgain, this code is for illustration Calculate max traffic by bisectionTo calculate the maximum possible traffic, we use the fact that, for a constant number ofchannelspgis increasing. This is intuitive, the higher the traffic, the higher the losses. Yet,this can be shall use the method of first derivative.

9 We shall prove:p g(s)>0 k=const(4)Using the widely known equation:f (uv) =f (u)f(v) f(u)f (v)v2on the Erlang B formula (1), presuming thatkis constant, gives us:p g(s) =ksk 1k!k i=0sii! skk!k i=0isi 1i!(k i=0sii!)2 For the purpose of our proof, observe that the denominator is a sqaure of some expressions,so it is 0, and can only be 0 ifs= 0(no traffic), which is of no interest to us. So we cananalyse the sign of the nominator !sk i=0sii! skk!k i=0isi 1i!=skk!(k i=0ksi 1i! k i=0isi 1i!)Sinceskk!>0, we can analyze only the expression inside the brackets:k i=0ksi 1 isi 1i!=k i=0si 1(k i)i!Now it is clear that the sign depends only on:k i=0(k i) = (k+ 1)k k i=0i=k(k+ 1) k(k+ 1)2>0We can use the bisection method, much like what we used for calculating the number ofchannels, so we shall give the Ruby code without further explanations:def traffic_erlangb(p_g, k)l, r = 0, erlangb(s, r) < p_gl = rr = 1 + (r * 3) / 2endmid = 0while (r-l) > 1mid = (l+r+1)/2if erlangb(mid, k) < p_gl = midelser = midendendreturn Extended Erlang B formulaIf withpdwe designate the probability of an immediate re-attempt after call failure, then thealgoritam of the Extended Erlang B formula is:1.

10 Calculate the Erlang B formula (1)2. Add the following to the offered traffic:spdpg3. Calculate Erlang B formula with the offered traffic from the previous step4. Repeat previous two steps untilpgbecomes becomes stable means that the difference between two subsequent values ofpgissmaller than a measure of in the Ruby programming language:def erlangb_extended(s, k, p_d, epsilon)r, p_g = , erlangb(s, k)delta = epsilonwhile delta >= epsilonr = erlangb(s, k)delta = (r - p_g).absp_g = rs += s * p_d * p_gendreturn p_gendIn the codeepsilonis the said measure of of the number of channels or the traffic from the extended Erlang B formulais basically the same as the Erlang B formula proper.


Related search queries