Class SolverMulti

java.lang.Object
solvers.queueingnet.amva.SolverMulti
Direct Known Subclasses:
AMVA

public abstract class SolverMulti extends Object
SolverMulti is an abstract class, which contains the methods initialize and solve multiclass models.
Author:
Federico Granata, Stefano Omini
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    number of classes
    static final int
    constant for Closed Class
    protected double[]
    average number of users for each class
    [class]
    protected double[]
    response time for each class
    [class]
    protected double[]
    throughput for each class
    [class]
    static final int
    constant for delay center
    static final int
    constant for Load Dependent service center
    static final int
    constant for Load Independent service center
    protected String[]
    array of names of service centers
    static final int
    constant for Open Class
    protected PrintWriter
    Printer writer: print formatted representations of objects to a text-output stream
    protected double[][]
    queue length for each service station, class
    [station] [class]
    protected double[][]
    residence time for each service station, class
    [station] [class]
    protected double[]
    queue length of the service centers
    [station]
    protected double[]
    residence time of the service centers
    [station]
    protected double[]
    throughputs of the service centers
    [station]
    protected double[]
    utilization of the service centers
    [station]
    protected int[]
    array of number of servers for each service center
    protected double[][][]
    service times for each service station, class, population
    [station] [class] [population]
    protected int
    number of service centers
    protected double
    Number of jobs in the system
    protected double
    System response time
    protected double
    System throughput
    protected double[][]
    throughput for each service station, class
    [station] [class]
    protected int[]
    array of types of service centers
    protected double[][]
    utilization for each service station, class
    [station] [class]
    protected double[][]
    visits for each service station, class
    [station] [class]
  • Constructor Summary

    Constructors
    Constructor
    Description
    SolverMulti(int classes, int stations)
    Creates a multiclasss solver
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns the queue length for each service center
    double
    getAggrQueueLen(int cent)
    Returns the queue length for the requested service center
    double[]
    Returns the residence time for each service center
    double
    getAggrResTime(int cent)
    Returns the residence time for the requested service center
    double[]
    Returns the throughput for each service center
    double
    Returns the throughput for the requested service center
    double[]
    Returns the utilization for each service center
    double
    Returns the utilization for the requested service center
    double[]
    Returns the response time of the whole system for each customer class
    double
    getClsResTime(int cls)
    Returns the response time of the whole system for the requested customer class
    double[]
    Returns the throughput of the whole system for each customer class
    double
    Returns the throughput of the whole system for the requested customer class
    double[][]
    Returns the queue length of each class for each station
    double
    getQueueLen(int cent, int cls)
    Returns the queue length of the given class for the requested station
    double[][]
    Returns the residence time of each class for each station
    double
    getResTime(int cent, int cls)
    Returns the residence time of the given class for the requested station
    double[][]
    Returns the throughput of each class for each station
    double
    getThroughput(int cent, int cls)
    Returns the throughput of the given class for the requested station
    double
    Returns the response time of the system
    double
    Returns the throughput of the system
    double[][]
    Returns the throughput of each class for each station
    double
    getUtilization(int cent, int cls)
    Returns the utilization of the given class for the requested station
    abstract boolean
    A system is said to have sufficient capacity to process a given load lambda if no service center is saturated as a result of the combined loads of all the classes.
    boolean
    input(String[] n, int[] t, double[][][] s, double[][] v)
    Initializes the Multiclass solver with the model parameters.
    void
    Prints all the calculated indices in the system.out.
    abstract void
    Must be implemented to create a multi class model solver.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LD

      public static final int LD
      constant for Load Dependent service center
      See Also:
    • LI

      public static final int LI
      constant for Load Independent service center
      See Also:
    • DELAY

      public static final int DELAY
      constant for delay center
      See Also:
    • OPEN_CLASS

      public static final int OPEN_CLASS
      constant for Open Class
      See Also:
    • CLOSED_CLASS

      public static final int CLOSED_CLASS
      constant for Closed Class
      See Also:
    • stations

      protected int stations
      number of service centers
    • classes

      protected int classes
      number of classes
    • name

      protected String[] name
      array of names of service centers
    • type

      protected int[] type
      array of types of service centers
    • servers

      protected int[] servers
      array of number of servers for each service center
    • servTime

      protected double[][][] servTime
      service times for each service station, class, population
      [station] [class] [population]
    • visits

      protected double[][] visits
      visits for each service station, class
      [station] [class]
    • throughput

      protected double[][] throughput
      throughput for each service station, class
      [station] [class]
    • utilization

      protected double[][] utilization
      utilization for each service station, class
      [station] [class]
    • queueLen

      protected double[][] queueLen
      queue length for each service station, class
      [station] [class]
    • residenceTime

      protected double[][] residenceTime
      residence time for each service station, class
      [station] [class]
    • scThroughput

      protected double[] scThroughput
      throughputs of the service centers
      [station]
    • scUtilization

      protected double[] scUtilization
      utilization of the service centers
      [station]
    • scQueueLen

      protected double[] scQueueLen
      queue length of the service centers
      [station]
    • scResidTime

      protected double[] scResidTime
      residence time of the service centers
      [station]
    • clsRespTime

      protected double[] clsRespTime
      response time for each class
      [class]
    • clsThroughput

      protected double[] clsThroughput
      throughput for each class
      [class]
    • clsNumJobs

      protected double[] clsNumJobs
      average number of users for each class
      [class]
    • sysResponseTime

      protected double sysResponseTime
      System response time
    • sysThroughput

      protected double sysThroughput
      System throughput
    • sysNumJobs

      protected double sysNumJobs
      Number of jobs in the system
    • pw

      protected PrintWriter pw
      Printer writer: print formatted representations of objects to a text-output stream
  • Constructor Details

    • SolverMulti

      public SolverMulti(int classes, int stations)
      Creates a multiclasss solver
      Parameters:
      classes - number of classes.
      stations - number of stations.
  • Method Details

    • input

      public boolean input(String[] n, int[] t, double[][][] s, double[][] v)
      Initializes the Multiclass solver with the model parameters.
      Parameters:
      n - array of names of service centers.
      t - array of the types (LD or LI) of service centers.
      s - matrix of service time of the service centers.
      v - matrix of visits to the service centers.
      Returns:
      true if the operation is completed with success
    • solve

      public abstract void solve()
      Must be implemented to create a multi class model solver.
    • hasSufficientProcessingCapacity

      public abstract boolean hasSufficientProcessingCapacity()
      A system is said to have sufficient capacity to process a given load lambda if no service center is saturated as a result of the combined loads of all the classes.
      Must be implemented to create a multi class model solver.
      WARNING: This method should be called before solving the system.
      Returns:
      true if sufficient capacity exists for the given workload, false otherwise
    • getThroughput

      public double getThroughput(int cent, int cls)
      Returns the throughput of the given class for the requested station
      Parameters:
      cent - the number of the service center
      cls - the customer class
      Returns:
      the throughput
    • getThroughput

      public double[][] getThroughput()
      Returns the throughput of each class for each station
      Returns:
      the throughput[center][class] matrix for the system
    • getUtilization

      public double getUtilization(int cent, int cls)
      Returns the utilization of the given class for the requested station
      Parameters:
      cent - the number of the service center
      cls - the customer class
      Returns:
      the utilization
    • getUtilization

      public double[][] getUtilization()
      Returns the throughput of each class for each station
      Returns:
      the utilization[center][class] matrix for the system
    • getQueueLen

      public double getQueueLen(int cent, int cls)
      Returns the queue length of the given class for the requested station
      Parameters:
      cent - the number of the service center
      cls - the customer class
      Returns:
      the queue length
    • getQueueLen

      public double[][] getQueueLen()
      Returns the queue length of each class for each station
      Returns:
      the queueLen[center][class] matrix for the system
    • getResTime

      public double getResTime(int cent, int cls)
      Returns the residence time of the given class for the requested station
      Parameters:
      cent - the number of the service center
      cls - the customer class
      Returns:
      the residence time
    • getResTime

      public double[][] getResTime()
      Returns the residence time of each class for each station
      Returns:
      the residenceTime[center][class] matrix for the system
    • getAggrThroughput

      public double getAggrThroughput(int cent)
      Returns the throughput for the requested service center
      Parameters:
      cent - the number of the service center
      Returns:
      the throughput
    • getAggrThroughput

      public double[] getAggrThroughput()
      Returns the throughput for each service center
      Returns:
      the throughput for each service center in the system
    • getAggrUtilization

      public double getAggrUtilization(int cent)
      Returns the utilization for the requested service center
      Parameters:
      cent - the number of the service center
      Returns:
      the utilization
    • getAggrUtilization

      public double[] getAggrUtilization()
      Returns the utilization for each service center
      Returns:
      the utilization for each service center in the system
    • getAggrQueueLen

      public double getAggrQueueLen(int cent)
      Returns the queue length for the requested service center
      Parameters:
      cent - the number of the service center
      Returns:
      the queue length
    • getAggrQueueLen

      public double[] getAggrQueueLen()
      Returns the queue length for each service center
      Returns:
      the queue length for each service center in the system
    • getAggrResTime

      public double getAggrResTime(int cent)
      Returns the residence time for the requested service center
      Parameters:
      cent - the number of the service center
      Returns:
      the residence time
    • getAggrResTime

      public double[] getAggrResTime()
      Returns the residence time for each service center
      Returns:
      the residence time for each service center in the system
    • getClsResTime

      public double getClsResTime(int cls)
      Returns the response time of the whole system for the requested customer class
      Parameters:
      cls - the customer class
      Returns:
      the response time
    • getClsResTime

      public double[] getClsResTime()
      Returns the response time of the whole system for each customer class
      Returns:
      the overall response time for each customer class in the system
    • getClsThroughput

      public double getClsThroughput(int cls)
      Returns the throughput of the whole system for the requested customer class
      Parameters:
      cls - the customer class
      Returns:
      the overall throughput
    • getClsThroughput

      public double[] getClsThroughput()
      Returns the throughput of the whole system for each customer class
      Returns:
      the overall throughput for each customer class in the system
    • getTotResTime

      public double getTotResTime()
      Returns the response time of the system
      Returns:
      the response time
    • getTotThroughput

      public double getTotThroughput()
      Returns the throughput of the system
      Returns:
      the throughput
    • printIndices

      public void printIndices()
      Prints all the calculated indices in the system.out. It is used to debug or test the class.