public class ErlangC extends Object implements MMcDelay
The rates at state X(t) = k are :
λk = | λ, | k = 0, 1,..., c + q - 1 |
μk = | {![]() |
![]() |
Constructor and Description |
---|
ErlangC(double arrivalRate,
double serviceRate)
Creates a new instance of ErlangC assuming an infinite queue capacity.
|
ErlangC(double arrivalRate,
double serviceRate,
int capacity)
Creates a new instance of ErlangC.
|
Modifier and Type | Method and Description |
---|---|
static double |
getAverageExcessTime(double arrivalRate,
double serviceRate,
int server,
double awt)
Returns the average excess time :
![]() |
static double |
getAverageExcessTime(double arrivalRate,
double serviceRate,
int capacity,
int server,
double awt)
Returns the average excess time :
![]() |
double |
getAverageExcessTime(int server,
double awt)
Returns the average excess time :
![]() |
static double |
getAverageQueueLength(double arrivalRate,
double serviceRate,
int server)
Returns the average queue length, that is the expected number of
customers waiting in queue.
|
static double |
getAverageQueueLength(double arrivalRate,
double serviceRate,
int capacity,
int server)
Returns the average queue length, that is the expected number of
customers waiting in queue.
|
double |
getAverageQueueLength(int server)
Returns the average queue length, that is the expected number of
customers waiting in queue.
|
static double |
getAverageWaitTime(double arrivalRate,
double serviceRate,
int server)
Returns the average wait time :
![]() |
static double |
getAverageWaitTime(double arrivalRate,
double serviceRate,
int capacity,
int server)
Returns the average wait time :
![]() |
double |
getAverageWaitTime(int server)
Returns the average wait time :
![]() |
static double |
getProbDelay(double arrivalRate,
double serviceRate,
int server)
Returns the delay probability :
Pr{W > 0}, such that the call will wait.
|
static double |
getProbDelay(double arrivalRate,
double serviceRate,
int capacity,
int server)
Returns the delay probability :
Pr{W > 0}, such that the call will wait.
|
double |
getProbDelay(int server)
Returns the delay probability :
Pr{W > 0}, such that the call will wait.
|
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}.
|
static double |
getServiceLevel(double arrivalRate,
double serviceRate,
int capacity,
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}.
|
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}.
|
static double[][] |
getStateProbDist(double arrivalRate,
double serviceRate,
int capacity,
int server)
Returns the mass probability distribution of the states (number of calls) in the queueing system.
|
static void |
main(String[] args)
Returns the service level and the delay probability of given parameters.
|
int |
minServer(double awt,
double slTarget)
Returns the minimum number c of servers needed to have a service level of at least
slTarget ,
that is :
minc >= 0{c : Pr{W <= awt} >= |
static int |
minServer(double arrivalRate,
double serviceRate,
double awt,
double slTarget)
Returns the minimum number c of servers needed to have a service level of at least
slTarget ,
that is :
minc >= 0{c : Pr{W <= awt} >= |
static int |
minServer(double arrivalRate,
double serviceRate,
int capacity,
double awt,
double slTarget)
Returns the minimum number c of servers needed to have a service level of at least
slTarget ,
that is :
minc >= 0{c : Pr{W <= awt} >= |
public ErlangC(double arrivalRate, double serviceRate, int capacity)
Integer.MAX_VALUE
for infinite queue capacity.arrivalRate
- the arrival rate.serviceRate
- the service rate.capacity
- the capacity of the queue.public ErlangC(double arrivalRate, double serviceRate)
arrivalRate
- the arrival rate.serviceRate
- the service rate.public double getProbDelay(int server)
getProbDelay
in interface MMcDelay
server
- the number of servers.public static double getProbDelay(double arrivalRate, double serviceRate, int server)
arrivalRate
- the arrival rate.serviceRate
- the service rate.server
- the number of servers.public static double getProbDelay(double arrivalRate, double serviceRate, int capacity, int server)
arrivalRate
- the arrival rate.serviceRate
- the service rate.capacity
- the capacity of the queue, sets to Integer.MAX_VALUE
for
infinite queue capacity.server
- the number of servers.public static double[][] getStateProbDist(double arrivalRate, double serviceRate, int capacity, int server)
arrivalRate
- the arrival rate.serviceRate
- the service rate.capacity
- the capacity of the queue, it must be finite and greater or equal to 0.server
- the number of servers.public double getServiceLevel(int server, double awt)
getServiceLevel
in interface MMcDelay
server
- the number of servers.awt
- the acceptable waiting time.public static double getServiceLevel(double arrivalRate, double serviceRate, int server, double awt)
arrivalRate
- the arrival rate.serviceRate
- the service rate.server
- the number of servers.awt
- the acceptable waiting time.public static double getServiceLevel(double arrivalRate, double serviceRate, int capacity, int server, double awt)
Integer.MAX_VALUE
for a queue with an infinite capacity.arrivalRate
- the arrival rate.serviceRate
- the service rate.capacity
- the capacity of the waiting queue.server
- the number of servers.awt
- the acceptable waiting time.public int minServer(double awt, double slTarget)
slTarget
,
that is :
minc >= 0{c : Pr{W <= awt} >= public static int minServer(double arrivalRate, double serviceRate, double awt, double slTarget)
slTarget
,
that is :
minc >= 0{c : Pr{W <= awt} >= arrivalRate
- the exponential arrival rate.serviceRate
- the exponential service rate.awt
- the acceptable waiting time.slTarget
- the target service level, it must be in the interval [0, 1].slTarget
.public static int minServer(double arrivalRate, double serviceRate, int capacity, double awt, double slTarget)
slTarget
,
that is :
minc >= 0{c : Pr{W <= awt} >= Integer.MAX_VALUE
, the capacity of the queue
is assumed infinite.
This function uses a binary search.arrivalRate
- the exponential arrival rate.serviceRate
- the exponential service rate.capacity
- the capacity of the queue.awt
- the acceptable waiting time.slTarget
- the target service level, it must be in the interval [0, 1].slTarget
.public double getAverageWaitTime(int server)
server
- the number of servers.public static double getAverageWaitTime(double arrivalRate, double serviceRate, int server)
arrivalRate
- the arrival rate.serviceRate
- the service rate.server
- the number of servers.public static double getAverageWaitTime(double arrivalRate, double serviceRate, int capacity, int server)
arrivalRate
- the arrival rate.serviceRate
- the service rate.capacity
- the capacity of the queue.server
- the number of servers.public double getAverageExcessTime(int server, double awt)
server
- the number of servers.awt
- the acceptable waiting time.public static double getAverageExcessTime(double arrivalRate, double serviceRate, int server, double awt)
arrivalRate
- the arrival rate.serviceRate
- the service rate.server
- the number of servers.awt
- the acceptable waiting time.public static double getAverageExcessTime(double arrivalRate, double serviceRate, int capacity, int server, double awt)
arrivalRate
- the arrival rate.serviceRate
- the service rate.capacity
- the capacity of the queue.server
- the number of servers.awt
- the acceptable waiting time.public double getAverageQueueLength(int server)
server
- the number of serverspublic static double getAverageQueueLength(double arrivalRate, double serviceRate, int server)
arrivalRate
- the arrival rateserviceRate
- the service rateserver
- the number of serverspublic static double getAverageQueueLength(double arrivalRate, double serviceRate, int capacity, int server)
arrivalRate
- the arrival rateserviceRate
- the service ratecapacity
- the capacity of the queueserver
- the number of serverspublic static void main(String[] args) throws Exception
args
- see the method descriptionException