jmarkov.jqbd.solvers

## Class QBDPhaseSolver

- java.lang.Object
- - jmarkov.jqbd.solvers.QBDPhaseSolver

- Direct Known Subclasses:
    CLPAlgorithm, ModBoundSolverFromMatrix, MtjLogRedSolverFromMatrix

      public abstract class QBDPhaseSolver
      extends java.lang.Object

  This class is abstrac and inplements the mathods necesaries to compute the performance measures for a PHPH1 model and generate the caracteristic matrix from it.
  Author:
    Andrés Sarmiento Romero

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QBDPhaseSolver()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.ArrayList<java.lang.Double>` | `getLevelSteadyStateProbs()`
    `abstract double[][]` | `getRmatrix()` Computs the R matrix for the QBD process
    `java.util.ArrayList<no.uib.cipr.matrix.DenseMatrix>` | `getSteadyStateProbsPerLevel()`
    `void` | `initilicePHPH1(PhaseVar arrivals, PhaseVar service)` This method computes the 6 QBD caracteristic matrices using the interarrival and service PH distributions
    `static no.uib.cipr.matrix.Matrix` | `multVector(no.uib.cipr.matrix.DenseVector A, no.uib.cipr.matrix.DenseVector B, no.uib.cipr.matrix.DenseMatrix res)` Computes the product of two vectors A x B^T
    `static no.uib.cipr.matrix.DenseVector` | `negativeMatVecMult(no.uib.cipr.matrix.Matrix A, double[] era, no.uib.cipr.matrix.DenseVector denseVector)` Computes the product of - a Matrix and a Vector A x B
    `java.lang.String` | `performanceMeasures(double[][] R1)` Computes the performance measures of a PH/PH/1 model
    `void` | `printMatrices()` Prints in console the Caracteristic matrices
    `void` | `setLambda(double lambda)` Sets the arrival rate
    `boolean` | `unstableSystem()` Verifies if the system is stable, this means that the arrival rate is lower than the service rate

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QBDPhaseSolver

          public QBDPhaseSolver()

  - ### Method Detail

    - #### initilicePHPH1

          public void initilicePHPH1(PhaseVar arrivals,
                            PhaseVar service)

      This method computes the 6 QBD caracteristic matrices using the interarrival and service PH distributions
      Parameters:
        `arrivals` - PH that represents the inter-arrival times
        `service` - PH that represents the service times

    - #### performanceMeasures

          public java.lang.String performanceMeasures(double[][] R1)

      Computes the performance measures of a PH/PH/1 model
      Parameters:
        `R1` - R Matrix for the QBD process
      Returns:
        A string with the performance masures

    - #### getLevelSteadyStateProbs

          public java.util.ArrayList<java.lang.Double> getLevelSteadyStateProbs()

      Returns:
        the level steady state probabilities

    - #### getSteadyStateProbsPerLevel

          public java.util.ArrayList<no.uib.cipr.matrix.DenseMatrix> getSteadyStateProbsPerLevel()

      Returns:
        the steady state probabilities per level

    - #### printMatrices

          public void printMatrices()

      Prints in console the Caracteristic matrices

    - #### negativeMatVecMult

          public static no.uib.cipr.matrix.DenseVector negativeMatVecMult(no.uib.cipr.matrix.Matrix A,
                                                          double[] era,
                                                          no.uib.cipr.matrix.DenseVector denseVector)

      Computes the product of - a Matrix and a Vector A x B
      Parameters:
        `A` - Vector
        `era` - Matrix
        `denseVector` - Vector to store the resulting matrix
      Returns:
        res = A x B^T

    - #### multVector

          public static no.uib.cipr.matrix.Matrix multVector(no.uib.cipr.matrix.DenseVector A,
                                             no.uib.cipr.matrix.DenseVector B,
                                             no.uib.cipr.matrix.DenseMatrix res)

      Computes the product of two vectors A x B^T
      Parameters:
        `A` - Vector
        `B` - Vector
        `res` - Vector to store the resulting matrix
      Returns:
        res = A x B^T

    - #### unstableSystem

          public boolean unstableSystem()

      Verifies if the system is stable, this means that the arrival rate is lower than the service rate
      Returns:
        True if is stable, False if not

    - #### setLambda

          public void setLambda(double lambda)

      Sets the arrival rate
      Parameters:
        `lambda` - arrival rate

    - #### getRmatrix

          public abstract double[][] getRmatrix()

      Computs the R matrix for the QBD process
      Returns:
        the R Matrix