Interface QueueLogic

All Known Implementing Classes:
MM1dLogic, MM1Logic, MMNdLogic, MMNLogic

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 Type
    Method
    Description
    double
    Calculates the arrival of the next job.(ms)
    int
    Returns the maximum number of the jobs in the queue(only buffer)
    int
    Returns the number of the servers.
    double
    Calculates the service time of the job.(ms)
    double
    Calculates the probability of each status.
    double
    Calculates the average number of the jobs in the queue(Q)
    double
    Calculates the average response time(R)
    double
    Calculates the average throughput(X)
    double
    Calculates the average utilization of the queue(U)
  • Method Details

    • getStatusProbability

      double getStatusProbability(int status) throws NonErgodicException
      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

      double getArrivalTime() throws NoJobsException
      Calculates the arrival of the next job.(ms)
      Returns:
      interarrival time
      Throws:
      NoJobsException - if the operation cannot be completed
    • getMaxStates

      int getMaxStates() throws InfiniteBufferException
      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

      double mediaJobs() throws NonErgodicException
      Calculates the average number of the jobs in the queue(Q)
      Throws:
      NonErgodicException
    • utilization

      double utilization() throws NonErgodicException
      Calculates the average utilization of the queue(U)
      Throws:
      NonErgodicException
    • throughput

      double throughput() throws NonErgodicException
      Calculates the average throughput(X)
      Throws:
      NonErgodicException
    • responseTime

      double responseTime() throws NonErgodicException
      Calculates the average response time(R)
      Throws:
      NonErgodicException
    • getNumberServer

      int getNumberServer()
      Returns the number of the servers.