Class MMNLogic
java.lang.Object
jmt.jmarkov.Queues.MM1Logic
jmt.jmarkov.Queues.MMNLogic
- All Implemented Interfaces:
QueueLogic
- Author:
- arifc
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of the servers.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)doubleCalculates the average throughput(X)doubleCalcola il traffico offerto in base ai parametri lambda[job/s] e s[ms]Methods inherited from class MM1Logic
getArrivalTime, getLambda, getMaxStates, getRunTime, getS, setLambda, setMaxStates, setS
-
Constructor Details
-
MMNLogic
public MMNLogic(double lambda, double s, int aNumberOfServer) - Parameters:
lambda-s-aNumberOfServer-
-
-
Method Details
-
getStatusProbability
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
- Throws:
NonErgodicException- if the operation cannot be completed
-
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
- Throws:
NonErgodicException- queue is not ergodic (U > 1 o U < 0)
-
utilization
Calcola il traffico offerto in base ai parametri lambda[job/s] e s[ms]- Specified by:
utilizationin interfaceQueueLogic- Overrides:
utilizationin classMM1Logic- Returns:
- Throws:
NonErgodicException- if the operation cannot be completed
-
throughput
Description copied from interface:QueueLogicCalculates the average throughput(X)- Specified by:
throughputin interfaceQueueLogic- Overrides:
throughputin classMM1Logic- Throws:
NonErgodicException
-
responseTime
Description copied from interface:QueueLogicCalculates the average response time(R)- Specified by:
responseTimein interfaceQueueLogic- Overrides:
responseTimein classMM1Logic- Throws:
NonErgodicException
-
getNumberServer
public int getNumberServer()Description copied from interface:QueueLogicReturns the number of the servers.- Specified by:
getNumberServerin interfaceQueueLogic- Overrides:
getNumberServerin classMM1Logic
-