ErlangB(Erl, n)
Last updated February 14, 2004
Version: 1 | Requires: CF5 | Library: MathLib
Description:
This UDF returns the fraction of incoming calls turned away during the Busy Hour because all lines are busy at the time of the call.
The algorithm is based on
Qiao, L. and Qiao, S. 1998, A Robust and Efficient Algorithm for Evaluating Erlang's Formula, Manuscript.
Web page with algorithm description is available at http://www.dcss.mcmaster.ca/~qiao/publications/erlang/newerlang.html
Return Values:
Returns a number.
Example:
<cfset traffic=3456.7>
<cfset lines=2000>
<cfset blocked=ErlangB(traffic,lines)>
<CFOUTPUT>
Percent of blocked calls = #evaluate(100*blocked)#
</CFOUTPUT>
Parameters:
Name | Description | Required |
---|---|---|
Erl | Busy Hour Traffic (BHT) or the number of hours of call traffic during the busiest hour of operation. | Yes |
n | Number of independent lines available for traffic. Positive integer. | Yes |
Full UDF Source:
/**
* Calculates the Grade of Service (failure rate) based on Busy Hour Traffic (Erlangs) and number of indepenedent lines
*
* @param Erl Busy Hour Traffic (BHT) or the number of hours of call traffic during the busiest hour of operation. (Required)
* @param n Number of independent lines available for traffic. Positive integer. (Required)
* @return Returns a number.
* @author Alex Belfor (abelfor@yahoo.com)
* @version 1, February 14, 2004
*/
function ErlangB(erl,n) {
var s=1;
var i=1;
for (i=1; i LTE n; i=i+1) s=s*i/erl+1;
return (1/s);
}
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016