Interface QueueLogic
public interface QueueLogic
This interface represent the logic of the queue types: the arrival
and the execution of the process/job. This changed with respect to
inputs arrival rate(lambda), service time, number of station capacity
or number of servers.
Each queue type could have different inputs.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculates the arrival of the next job.(ms)intReturns the maximum number of the jobs in the queue(only buffer)intReturns the number of the servers.doubleCalculates the service time of the job.(ms)doublegetStatusProbability(int status) Calculates the probability of each status.doubleCalculates the average number of the jobs in the queue(Q)doubleCalculates the average response time(R)doubleCalculates the average throughput(X)doubleCalculates the average utilization of the queue(U)
-
Method Details
-
getStatusProbability
Calculates the probability of each status.- Parameters:
status- number of elements in the status- Returns:
- the probability of the status
- Throws:
NonErgodicException- if the operation cannot be completed
-
getRunTime
double getRunTime()Calculates the service time of the job.(ms)- Returns:
- service time
-
getArrivalTime
Calculates the arrival of the next job.(ms)- Returns:
- interarrival time
- Throws:
NoJobsException- if the operation cannot be completed
-
getMaxStates
Returns the maximum number of the jobs in the queue(only buffer)- Returns:
- 0 if the buffer is ideal(infinite), a positive number, otherwise
- Throws:
InfiniteBufferException- if the operation cannot be completed
-
mediaJobs
Calculates the average number of the jobs in the queue(Q)- Throws:
NonErgodicException
-
utilization
Calculates the average utilization of the queue(U)- Throws:
NonErgodicException
-
throughput
Calculates the average throughput(X)- Throws:
NonErgodicException
-
responseTime
Calculates the average response time(R)- Throws:
NonErgodicException
-
getNumberServer
int getNumberServer()Returns the number of the servers.
-