Class MM1dLogic
java.lang.Object
jmt.jmarkov.Queues.MM1Logic
jmt.jmarkov.Queues.MM1dLogic
- All Implemented Interfaces:
QueueLogic
MMQueues
--------------------------------------
25-mar-2004 - Queues/MM1dLogic.java
- Author:
- Ernesto
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum number of the jobs in the queue(only buffer)doublegetStatusProbability(int status) Calculates the probability of each status.doubleCalculate the average jobs in the station with respect to lambda and sdoubleCalculates the average response time(R)voidsetMaxStates(int max) Sets the max states.doubleCalculates the average throughput(X)doubleCalculate the utilizaion of the server with respect to parameters lambda and sMethods inherited from class MM1Logic
getArrivalTime, getLambda, getNumberServer, getRunTime, getS, setLambda, setS
-
Constructor Details
-
MM1dLogic
public MM1dLogic(double lambda, double s, int max) Initializes the queue- Parameters:
lambda- represent the medium of arrival of Poisson process [job/s]s- represent the medium of the service time of Poisson process [ms]max- represent the maximum length of the queue
-
-
Method Details
-
getStatusProbability
public double getStatusProbability(int status) Description copied from interface:QueueLogicCalculates the probability of each status.- Specified by:
getStatusProbabilityin interfaceQueueLogic- Overrides:
getStatusProbabilityin classMM1Logic- Parameters:
status- number of elements in the status- Returns:
- the probability of the status
-
getMaxStates
public int getMaxStates()Description copied from interface:QueueLogicReturns the maximum number of the jobs in the queue(only buffer)- Specified by:
getMaxStatesin interfaceQueueLogic- Overrides:
getMaxStatesin classMM1Logic- Returns:
- 0 if the buffer is ideal(infinite), a positive number, otherwise
-
setMaxStates
public void setMaxStates(int max) Description copied from class:MM1LogicSets the max states.- Overrides:
setMaxStatesin classMM1Logic- Parameters:
max-
-
mediaJobs
public double mediaJobs()Description copied from class:MM1LogicCalculate the average jobs in the station with respect to lambda and s- Specified by:
mediaJobsin interfaceQueueLogic- Overrides:
mediaJobsin classMM1Logic- Returns:
- number of average jobs in the station
-
responseTime
public double responseTime()Description copied from interface:QueueLogicCalculates the average response time(R)- Specified by:
responseTimein interfaceQueueLogic- Overrides:
responseTimein classMM1Logic
-
throughput
public double throughput()Description copied from interface:QueueLogicCalculates the average throughput(X)- Specified by:
throughputin interfaceQueueLogic- Overrides:
throughputin classMM1Logic
-
utilization
public double utilization()Description copied from class:MM1LogicCalculate the utilizaion of the server with respect to parameters lambda and s- Specified by:
utilizationin interfaceQueueLogic- Overrides:
utilizationin classMM1Logic- Returns:
- utilization
-