Class MM1dLogic

java.lang.Object
jmt.jmarkov.Queues.MM1Logic
jmt.jmarkov.Queues.MM1dLogic
All Implemented Interfaces:
QueueLogic

public class MM1dLogic extends MM1Logic
MMQueues -------------------------------------- 25-mar-2004 - Queues/MM1dLogic.java
Author:
Ernesto
  • 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: QueueLogic
      Calculates the probability of each status.
      Specified by:
      getStatusProbability in interface QueueLogic
      Overrides:
      getStatusProbability in class MM1Logic
      Parameters:
      status - number of elements in the status
      Returns:
      the probability of the status
    • getMaxStates

      public int getMaxStates()
      Description copied from interface: QueueLogic
      Returns the maximum number of the jobs in the queue(only buffer)
      Specified by:
      getMaxStates in interface QueueLogic
      Overrides:
      getMaxStates in class MM1Logic
      Returns:
      0 if the buffer is ideal(infinite), a positive number, otherwise
    • setMaxStates

      public void setMaxStates(int max)
      Description copied from class: MM1Logic
      Sets the max states.
      Overrides:
      setMaxStates in class MM1Logic
      Parameters:
      max -
    • mediaJobs

      public double mediaJobs()
      Description copied from class: MM1Logic
      Calculate the average jobs in the station with respect to lambda and s
      Specified by:
      mediaJobs in interface QueueLogic
      Overrides:
      mediaJobs in class MM1Logic
      Returns:
      number of average jobs in the station
    • responseTime

      public double responseTime()
      Description copied from interface: QueueLogic
      Calculates the average response time(R)
      Specified by:
      responseTime in interface QueueLogic
      Overrides:
      responseTime in class MM1Logic
    • throughput

      public double throughput()
      Description copied from interface: QueueLogic
      Calculates the average throughput(X)
      Specified by:
      throughput in interface QueueLogic
      Overrides:
      throughput in class MM1Logic
    • utilization

      public double utilization()
      Description copied from class: MM1Logic
      Calculate the utilizaion of the server with respect to parameters lambda and s
      Specified by:
      utilization in interface QueueLogic
      Overrides:
      utilization in class MM1Logic
      Returns:
      utilization