public class ErlangB extends Object
Let λ, μ, c be the arrival rate, service rate and the number of agents, respectively. The transition rates at each state are :
λk = | λ, | k = 0,..., c - 1 |
μk = | kμ, | k = 1,..., c. |
π0(μ) | = | (∑v=0sλv/[v!μv])-1 |
πk(μ) | = | πk-1(μ)λ/(kμ), k = 1,..., c. |
We have the load ρ = λ/μ in erlang units. The blocking probability B(ρ, c) is :
Cooper Cooper (1981) gives the relation between the Erlang B and Erlang C formulae for
a queueing model with an infinite queue capacity and no abandonment nor blocking.
Based on this relationship, this class includes methods to compute the delay probability
and service level of the corresponding Erlang C formula, assuming an infinite queue capacity:
getProbDelay(int)
, double, int)
,
double)
and double, int, double)
.
Constructor and Description |
---|
ErlangB(double arrivalRate,
double serviceRate)
Creates a new instance of ErlangB.
|
Modifier and Type | Method and Description |
---|---|
static double |
getProbBlocking(double arrivalRate,
double serviceRate,
int server)
Returns the blocking probability of Erlang B formula with the given parameters.
|
static double |
getProbBlocking(double load,
int server)
Returns the blocking probability of Erlang B formula with the given parameters.
|
double |
getProbBlocking(int server)
Returns the probability of blocking, which is the Erlang B formula.
|
static double |
getProbDelay(double arrivalRate,
double serviceRate,
int server)
Computes the delay probability
Pr{W > 0} (the Erlang C formula) from the Erlang B formula, where
W is the waiting time.
|
double |
getProbDelay(int server)
Computes the delay probability
Pr{W > 0} (the Erlang C formula) from the Erlang B formula.
|
static double |
getServiceLevel(double arrivalRate,
double serviceRate,
int server,
double awt)
Returns the service level which is the proportion of calls that have waited less or equal to awt,
Pr{W <= awt} of the Erlang C model.
|
double |
getServiceLevel(int server,
double awt)
Returns the service level which is the proportion of calls that have waited less or equal to awt,
Pr{W <= awt} of the Erlang C model.
|
static void |
main(String[] args)
Returns the blocking probability, and optionally the delay probability and the service level
of given parameters.
|
int |
minServer(double b)
Returns the minimum number c of servers needed to have a blocking probability equal or less than b.
|
static int |
minServer(double arrivalRate,
double serviceRate,
double b)
Returns the minimum number c of servers needed to have a blocking probability equal or less than b.
|
public ErlangB(double arrivalRate, double serviceRate)
arrivalRate
- the exponential arrival rate.serviceRate
- the exponential service rate.public double getProbBlocking(int server)
server
- the number of server (or agents)public static double getProbBlocking(double arrivalRate, double serviceRate, int server)
arrivalRate
- the exponential arrival rate.serviceRate
- the exponential service rate.server
- the number of server (or agents).public static double getProbBlocking(double load, int server)
load
- the offered load (
λ/μ).server
- the number of server (or agents).public int minServer(double b)
b
- the blocking probability threshold, it must reside in the interval ]0, 1[ (exclusive bounds).public static int minServer(double arrivalRate, double serviceRate, double b)
arrivalRate
- the exponential arrival rate.serviceRate
- the exponential service rate.b
- the blocking probability threshold, it must reside in the interval ]0, 1[ (exclusive bounds).public double getProbDelay(int server)
It assumes an queue with a infinite capacity. There are no abandonment and no blocking. The relation between the Erlang B and Erlang C formulae is given by Cooper, see Cooper (1981).
server
- the number of servers.public static double getProbDelay(double arrivalRate, double serviceRate, int server)
It assumes an queue with a infinite capacity. There are no abandonment and no blocking. The relation between the Erlang B and Erlang C formulae is given by Cooper, see Cooper (1981).
arrivalRate
- the arrival rate.serviceRate
- the service rate.server
- the number of servers.public double getServiceLevel(int server, double awt)
awt
must be given in the same unit as the arrival and service rates.
Like with the delay probability, this queueing model assumes no abandonment nor blocking with
an infinite capacity queue.
server
- the number of servers.awt
- the acceptable waiting time.public static double getServiceLevel(double arrivalRate, double serviceRate, int server, double awt)
The parameter awt
must be given in the same unit as the arrival and service rates.
Like with the delay probability, this queueing model assumes no abandonment nor blocking with
an infinite capacity queue.
arrivalRate
- the arrival rate.serviceRate
- the service rate.server
- the number of servers.awt
- the acceptable waiting time.public static void main(String[] args) throws Exception
Arguments to give : <arrival rate> <service rate> <number of servers> [<awt>]. If awt is omitted, only the blocking probability will be calculated.
Exception