
Math::Telephony::ErlangC - Perl extension for Erlang C calculations

use Math::Telephony::ErlangC; # Evaluate probability that a service request will have to wait $wprob = wait_probability($traffic, $servers); # Probability that the wait time will be less than a fixed maximum # $mst is the mean service time $mwprob = maxtime_probability($traffic, $servers, $mst, $maxtime); # Average time waiting in queue # $mst is the mean service time $awtime = average_wait_time($traffic, $servers, $mst);

This mosule contains various functions to deal with Erlang C calculations.
The Erlang C model allows dimensioning the number of servers in a M/M/S/inf/inf model (Kendall notation):
None by default. Following functions can be imported at once via the ":all" keyword.
Some concepts are common to the the following functions:
Evaluate the probability that a call will have to wait in the queue because all servers are busy.
Evaluate the needed number of servers to handle $traffic Erlangs with a wait probability not greater than $wait_probability.
Evaluate the maximum traffic that can be handled with $servers without having a wait probability for any request that is beyond the given value. The calculation is performed until the iteration process shows variations below $prec, which is optional and defaults to $Math::Telephony::ErlangB::default_precision.
Evaluate the probability that any given service request will be handled within the given maximum time.
Evaluate the needed number of servers given the $traffic in erlang, $maxtime_probability, i.e. the probability that any given request will be served in no more than $maxtime seconds, and $mst, which represents the mean service time for any given request.
Evaluate the maximum traffic that can be handled with $servers, with $maxtime_probability that the any given request will be handled within $maxtime. Parameter $mst represents the average time needed to serve a request.
You can optionally specify a $prec precision for calculations, otherwise the precision will default to $Math::Telephony::ErlangB::precision.
Evaluate the mean service time required when other parameters are fixed.
Evaluate the mean service time required when other parameters are fixed.
Evaluate the maximum time required to process a request with a probability of $maxt_prob.
Evaluate the average waiting time, i.e. average time spent inside the queue by the generic request.
Evaluate the needed number of servers to serve the given $traffic with an average wait time in queue not exceeding $average_wait_time for each request. $mst is the mean service time.
Evaluate the maximum traffic that can be handled with $servers, where the average wait time does not exceed $average_wait_time. $mst is the mean service time.
You can optionally specify a $prec precision for calculations, otherwise the precision will default to $Math::Telephony::ErlangB::precision.
Evaluate the mean service time for $servers being offered $traffic, assuming that the average wait time in queue is $awt.
Evaluate the mean service time for $servers loaded with requests wich occur with $frequency, assuming that the average wait time in queue is $awt.
Solve equations to find needed servers. You can pass various input parameters:

You can google for plenty of information about Erlang C.

Flavio Poletti <flavio@polettix.it>

Copyright (C) 2005 by Flavio Poletti
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.