Class MoMSolverDispatcher

java.lang.Object
solvers.control.MoMSolverDispatcher

public class MoMSolverDispatcher extends Object
This class implements the API to allow use by other applications. One can define the queueing network model details, call the solvers transparently and, afterwards, read the results.
Author:
Michail Makaronidis, 2010
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    number of classes or jobs in the system
    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 int
    Number of threads that the MoMSolver should use
    protected int[]
    Array containing population for each class
    protected QNModel
    Contains the queueing network model
    protected double[][]
    array containing the queue length of each service center
    protected int
    number of resources
    protected double[]
    array containing the throughput of each service center
  • Constructor Summary

    Constructors
    Constructor
    Description
    MoMSolverDispatcher(int classes, int stations, int[] population)
    Creates new MoMSolverDispatcher
  • Method Summary

    Modifier and Type
    Method
    Description
    double[][]
    Returns the mean queue lengths as an MxR array of doubles.
    double[]
    Returns the mean throughputs as an array of R doubles.
    Returns the value of the normalising constant as a BigRational.
    Returns the value of the normalising constant as a string.
    boolean
    input(int[] t, double[][] s, double[][] v, int nThreads)
    Initializes the solver with the system parameters.
    void
    Solves the system through the MoM algorithm.

    Methods inherited from class Object

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

    • classes

      protected int classes
      number of classes or jobs in the system
    • population

      protected int[] population
      Array containing population for each class
    • qnm

      protected QNModel qnm
      Contains the queueing network model
    • nThreads

      protected int nThreads
      Number of threads that the MoMSolver should use
    • 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:
    • stations

      protected int stations
      number of resources
    • throughput

      protected double[] throughput
      array containing the throughput of each service center
    • queueLen

      protected double[][] queueLen
      array containing the queue length of each service center
  • Constructor Details

    • MoMSolverDispatcher

      public MoMSolverDispatcher(int classes, int stations, int[] population)
      Creates new MoMSolverDispatcher
      Parameters:
      classes - number of classes
      stations - number of service centers
      population - array of class populations
  • Method Details

    • input

      public boolean input(int[] t, double[][] s, double[][] v, int nThreads)
      Initializes the solver with the system parameters. It must be called before trying to solve the model.
      Parameters:
      t - array of the types (LD or LI) of service centers
      s - matrix of service times of the service centers
      v - array of visits to the service centers
      nThreads - The number of threads the solver should use. If nThreads > 2 then the parallel algorithm is used.
      Returns:
      True if the operation is completed with success
    • solve

    • getPrettyNormalisingConstant

      public String getPrettyNormalisingConstant()
      Returns the value of the normalising constant as a string. May contain fractional part.
      Returns:
      The string representing the normalising constant
    • getNormalisingConstant

      public BigRational getNormalisingConstant()
      Returns the value of the normalising constant as a BigRational.
      Returns:
      The BigRational representing the normalising constant
    • getMeanQueueLengths

      public double[][] getMeanQueueLengths()
      Returns the mean queue lengths as an MxR array of doubles.
      Returns:
      The double[M][R] array.
    • getMeanThroughputs

      public double[] getMeanThroughputs()
      Returns the mean throughputs as an array of R doubles.
      Returns:
      The double[R] array.