Class MMPP2

All Implemented Interfaces:
Serializable, Copyable

public class MMPP2 extends MarkovModulated implements Serializable
A Markovian-modulated Poisson Process with 2 states
See Also:
  • Constructor Details

    • MMPP2

      public MMPP2(double lambda0, double lambda1, double sigma0, double sigma1)
  • Method Details

    • fitCentralAndACFDecay

      public static MMPP2 fitCentralAndACFDecay(double mean, double var, double skew, double g2)
    • fitCentralAndACFLag1

      public static MMPP2 fitCentralAndACFLag1(double mean, double var, double skew, double acf1)
    • fitCentralAndIDC

      public static MMPP2 fitCentralAndIDC(double mean, double var, double skew, double idc)
    • fitRawMomentsAndACFDecay

      public static MMPP2 fitRawMomentsAndACFDecay(double m1, double m2, double m3, double gamma2)
    • fitRawMomentsAndACFLag1

      public static MMPP2 fitRawMomentsAndACFLag1(double m1, double m2, double m3, double rho1)
    • fitRawMomentsAndIDC

      public static MMPP2 fitRawMomentsAndIDC(double m1, double m2, double m3, double idc)
    • rand

      public static MMPP2 rand()
    • D

      public Matrix D(int i)
      Description copied from class: Markovian
      Gets the i-th matrix of the Markovian arrival process representation.
      Overrides:
      D in class Markovian
      Parameters:
      i - the matrix index (0 for D0, 1 for D1, etc.)
      Returns:
      the matrix at index i
    • evalACFT

      public Matrix evalACFT(int[] lags, double timescale)
      Overrides:
      evalACFT in class MarkovModulated
    • evalCDF

      public double evalCDF(double t)
      Evaluates the cumulative distribution function (CDF) at time t. For MMPP2, this represents the probability that an inter-arrival time is less than or equal to t.
      Overrides:
      evalCDF in class Markovian
      Parameters:
      t - the time value
      Returns:
      the CDF value at time t
    • evalLST

      public double evalLST(double s)
      Evaluates the Laplace-Stieltjes Transform (LST) at parameter s. For MMPP2, LST(s) = alpha * (-T + s*I)^(-1) * t
      Overrides:
      evalLST in class Markovian
      Parameters:
      s - the transform parameter
      Returns:
      the LST value at parameter s
    • evalMeanT

      public double evalMeanT(double t)
      Description copied from class: Markovian
      Evaluates the mean count at time t.
      Overrides:
      evalMeanT in class Markovian
      Parameters:
      t - the time point
      Returns:
      the mean count at time t
    • getACFDecay

      public double getACFDecay(Matrix lags)
    • getEmbedded

      public Matrix getEmbedded()
      Description copied from class: Markovian
      Gets the embedded Markov chain transition matrix.
      Overrides:
      getEmbedded in class Markovian
      Returns:
      the embedded chain matrix
    • getEmbeddedProb

      public Matrix getEmbeddedProb()
      Description copied from class: Markovian
      Gets the stationary probability vector of the embedded Markov chain.
      Overrides:
      getEmbeddedProb in class Markovian
      Returns:
      the embedded chain stationary probabilities
    • getIDC

      public double getIDC()
      Description copied from class: Markovian
      Gets the index of dispersion for counts (IDC).
      Overrides:
      getIDC in class Markovian
      Returns:
      the IDC value
    • getIDI

      public double getIDI()
      Description copied from class: Markovian
      Gets the index of dispersion for intervals (IDI). For renewal processes, IDI = IDC.
      Overrides:
      getIDI in class Markovian
      Returns:
      the IDI value
    • getMean

      public double getMean()
      Description copied from class: Markovian
      Gets the mean of this Markovian distribution.
      Overrides:
      getMean in class Markovian
      Returns:
      the mean value, or NaN if the process contains NaN values
    • getNumberOfPhases

      public long getNumberOfPhases()
      Description copied from class: Markovian
      Gets the number of phases in this Markovian distribution.
      Overrides:
      getNumberOfPhases in class Markovian
      Returns:
      the number of phases
    • getRate

      public double getRate()
      Description copied from class: Distribution
      Gets the rate of this distribution (inverse of mean).
      Overrides:
      getRate in class Markovian
      Returns:
      the rate value (1/mean)
    • getSCV

      public double getSCV()
      Description copied from class: Distribution
      Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
      Overrides:
      getSCV in class Markovian
      Returns:
      the squared coefficient of variation
    • getSkewness

      public double getSkewness()
      Description copied from class: Distribution
      Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
      Overrides:
      getSkewness in class Markovian
      Returns:
      the skewness value
    • getVar

      public double getVar()
      Description copied from class: Distribution
      Gets the variance of this distribution. Computed as SCV * mean^2.
      Overrides:
      getVar in class Markovian
      Returns:
      the variance
    • normalize

      public void normalize()
      Normalizes the MMPP2 so that D0+D1 rows form a proper infinitesimal generator. Each row sum of (D0+D1) should equal zero for a valid generator.
    • sample

      public double[] sample(int n)
      Description copied from class: Distribution
      Generates random samples from this distribution using default random generator.
      Overrides:
      sample in class Markovian
      Parameters:
      n - the number of samples to generate
      Returns:
      array of random samples
    • sample

      public double[] sample(int n, Random random)
      Description copied from class: Distribution
      Generates random samples from this distribution using the specified random generator.
      Overrides:
      sample in class Markovian
      Parameters:
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of random samples
    • toTimeReversed

      public MAP toTimeReversed()
    • evalPDF

      public double evalPDF(double t)
      Evaluates the probability density function (PDF) at time t. For MMPP2, this is the derivative of the CDF.
      Parameters:
      t - the time value
      Returns:
      the PDF value at time t
    • evalVarT

      public double evalVarT(double t)
      Evaluates the variance at time t. For MMPP2, this provides the variance of the counting process at time t.
      Overrides:
      evalVarT in class Markovian
      Parameters:
      t - the time value
      Returns:
      the variance at time t
    • toString

      public String toString()
      Returns a string representation of this MMPP2 process.
      Overrides:
      toString in class Object
      Returns:
      string representation showing parameters
    • equals

      public boolean equals(Object obj)
      Checks if this MMPP2 is equal to another object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare with
      Returns:
      true if equal, false otherwise
    • hashCode

      public int hashCode()
      Returns the hash code for this MMPP2 process.
      Overrides:
      hashCode in class Object
      Returns:
      hash code based on parameters