Class RAP

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class RAP
    extends Markovian
                        

    A Rational Arrival Process (RAP) distribution. RAP is a generalization of the Markovian Arrival Process (MAP) where the matrices H0 and H1 represent hidden and visible transitions respectively, but with relaxed constraints compared to MAP. Representation: - H0: matrix of hidden transition rates (transitions without arrivals) - H1: matrix of visible transition rates (transitions with arrivals) - H0 + H1 must form a valid infinitesimal generator (row sums = 0) - All eigenvalues of H0 must have negative real parts - Dominant eigenvalue of H0 must be negative and real The marginal distribution of inter-arrival times is a Matrix Exponential (ME) distribution.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      RAP(Matrix H0, Matrix H1) Creates a Rational Arrival Process with specified H0 and H1 matrices.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Matrix getH0() Gets the H0 matrix (hidden transition rates).
      Matrix getH1() Gets the H1 matrix (visible transition rates).
      long getNumberOfPhases() Gets the number of phases in this Markovian distribution.
      MatrixCell getProcess() Gets the matrix representation of this Markovian process.
      static RAP fitMomentsAndCorrelations(Array<double> moments, Array<double> correlations) Creates a RAP by fitting the given moments and correlations.
      static RAP fitMoments(Array<double> moments) Creates a RAP by fitting the given moments.
      static RAP fromMAP(MAP map) Creates a RAP from a Markovian Arrival Process (MAP).
      static RAP fromPoisson(double rate) Creates a RAP from an exponential renewal process (Poisson process).
      static RAP fromErlang(int k, double rate) Creates a RAP from an Erlang renewal process.
      static RAP fromHyperExp(double p, double lambda1, double lambda2) Creates a RAP from a Hyper-exponential distribution.
      static RAP fitMeanAndSCV(double mean, double scv) Creates a RAP by fitting the given mean and squared coefficient of variation (SCV).
      • Methods inherited from class jline.lang.processes.Markovian

        D, acf, embedded, embeddedProb, evalCDF, evalCDF, evalLST, evalMeanT, evalVarT, getACF, getEmbedded, getEmbeddedProb, getIDC, getIDI, getInitProb, getMean, getMoments, getMu, getPhi, getRate, getSCV, getSkewness, getSubgenerator, getVar, getVariance, idc, idi, initProb, mean, moments, mu, numPhases, numberOfPhases, phi, process, rate, sample, sample, scv, setMean, setProcess, setRate, skewness, subgenerator, var, variance
      • Methods inherited from class jline.lang.processes.Distribution

        evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
      • Methods inherited from class jline.lang.Copyable

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RAP

        RAP(Matrix H0, Matrix H1)
        Creates a Rational Arrival Process with specified H0 and H1 matrices.
        Parameters:
        H0 - matrix of hidden transition rates (square matrix)
        H1 - matrix of visible transition rates (square matrix, same size as H0)
    • Method Detail

      • getH0

         Matrix getH0()

        Gets the H0 matrix (hidden transition rates).

        Returns:

        the H0 matrix

      • getH1

         Matrix getH1()

        Gets the H1 matrix (visible transition rates).

        Returns:

        the H1 matrix

      • getNumberOfPhases

         long getNumberOfPhases()

        Gets the number of phases in this Markovian distribution.

        Returns:

        the number of phases

      • getProcess

         MatrixCell getProcess()

        Gets the matrix representation of this Markovian process.

        Returns:

        MatrixCell containing D0, D1, ... matrices

      • fitMomentsAndCorrelations

         static RAP fitMomentsAndCorrelations(Array<double> moments, Array<double> correlations)

        Creates a RAP by fitting the given moments and correlations. Uses BuTools RAPFromMomentsAndCorrelations algorithm if available.

        Parameters:
        moments - array of moments
        correlations - array of lag-k correlations
        Returns:

        a RAP matching the given moments and correlations

      • fitMoments

         static RAP fitMoments(Array<double> moments)

        Creates a RAP by fitting the given moments. Uses BuTools RAPFromMoments algorithm if available.

        Parameters:
        moments - array of moments
        Returns:

        a RAP matching the given moments

      • fromMAP

         static RAP fromMAP(MAP map)

        Creates a RAP from a Markovian Arrival Process (MAP). This shows that MAP is a special case of RAP.

        Parameters:
        map - the MAP to convert to RAP
        Returns:

        a RAP equivalent to the given MAP

      • fromPoisson

         static RAP fromPoisson(double rate)

        Creates a RAP from an exponential renewal process (Poisson process).

        Parameters:
        rate - the arrival rate (lambda)
        Returns:

        a RAP representing a Poisson process

      • fromErlang

         static RAP fromErlang(int k, double rate)

        Creates a RAP from an Erlang renewal process.

        Parameters:
        k - number of phases
        rate - rate parameter for each phase
        Returns:

        a RAP representing an Erlang renewal process

      • fromHyperExp

         static RAP fromHyperExp(double p, double lambda1, double lambda2)

        Creates a RAP from a Hyper-exponential distribution.

        Parameters:
        p - probability of using the first phase
        lambda1 - rate parameter for the first phase
        lambda2 - rate parameter for the second phase
        Returns:

        a RAP representing a Hyper-exponential renewal process

      • fitMeanAndSCV

         static RAP fitMeanAndSCV(double mean, double scv)

        Creates a RAP by fitting the given mean and squared coefficient of variation (SCV). Uses Erlang fitting for SCV <1 and HyperExp fitting for SCV >= 1.

        Parameters:
        mean - target mean inter-arrival time
        scv - target squared coefficient of variation
        Returns:

        a RAP matching the given mean and SCV