Math-Telephony-ErlangC
view release on metacpan or search on metacpan
lib/Math/Telephony/ErlangC.pm view on Meta::CPAN
$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);
=head1 DESCRIPTION
This module 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):
=over
=item *
The input process is Markovian (Poisson in this case)
=item *
The serving process is Markovian (ditto)
=item *
There are S servers
=item *
The wait line is infinite (pure wait, no loss, no renounce)
=item *
The input population is infinite
=back
=head2 CONCEPTS
Some concepts are common to the the following functions:
=over
=item *
B<traffic> is the offered traffic expressed in Erlang. When an input
parameter, this value must be defined and greater or equal to 0. As
per definition, this value is given by the product of the service
request arrival and the average service time (see below for this).
=item *
B<servers> is the number of servers in the queue. When an input parameter,
this must be a defined value, greater or equal to 0.
=item *
B<wait probability> is the probability that a given service request will
be put inside the wait queue, which happens when all servers are busy.
=item *
B<(average) service time> is the (average) time that each server needs to
complete a service request; it's referred to as $mst most of the time
below.
=back
=head1 INTERFACE
=head2 EXPORT
None by default. Following functions can be imported at once via the
":all" keyword.
=head2 FUNCTIONS FOR WAIT PROBABILITY
=over
=item B<$wprob = wait_probability($traffic, $servers);>
Evaluate the probability that a call will have to wait in the queue
because all servers are busy.
=item B<$servers = servers_waitprob($traffic, $wait_probability)>
Evaluate the needed number of servers to handle $traffic Erlangs with
a wait probability not greater than $wait_probability.
=item B<$traffic = traffic_waitprob($servers, $wait_probability, $prec);>
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.
=back
=head2 FUNCTIONS FOR MAXIMUM WAIT TIME PROBABILITY
=over
=item B<$mwprob = maxtime_probability($traffic, $servers, $mst, $maxtime);>
Evaluate the probability that any given service request will be handled
within the given maximum time.
=item B<$servers = servers_maxtime($traffic, $maxtime_probability, $mst, $maxtime);>
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.
=item B<$traffic = traffic_maxtime($servers, $maxtime_probability, $mst, $maxtime, $prec);>
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.
=item B<$mst = service_time_maxtime($traffic, $servers, $maxt_prob, $maxtime);>
Evaluate the mean service time required when other parameters are fixed.
( run in 0.977 second using v1.01-cache-2.11-cpan-39bf76dae61 )