Class MAP

All Implemented Interfaces:
Serializable, Copyable
Direct Known Subclasses:
MMPP

public class MAP extends MarkovModulated implements Serializable
A Markovian Arrival Process
See Also:
  • Constructor Details

  • Method Details

    • rand

      public static MAP rand()
    • rand

      public static MAP rand(int order)
    • randn

      public static MAP randn()
    • randn

      public static MAP randn(int order, double mu, double sigma)
    • 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
    • evalCDF

      public double evalCDF(double t)
      Evaluates the cumulative distribution function (CDF) at time t. For a MAP, 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 a MAP, LST(s) = alpha * (-T + s*I)^(-1) * t where alpha is the initial probability vector, T is the subgenerator, and t is the exit rate vector.
      Overrides:
      evalLST in class Markovian
      Parameters:
      s - the transform parameter
      Returns:
      the LST value at parameter s
    • 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
    • getProcess

      public MatrixCell getProcess()
      Description copied from class: Markovian
      Gets the matrix representation of this Markovian process.
      Overrides:
      getProcess in class Markovian
      Returns:
      MatrixCell containing D0, D1, ... matrices
    • 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)
    • getRenewalProcess

      public MatrixCell getRenewalProcess()
    • 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
    • toTimeReversed

      public MAP toTimeReversed()
    • evalMeanT

      public double evalMeanT(double t)
      Evaluates the mean of the counting process at time t. For MAP, this gives the expected number of arrivals by time t.
      Overrides:
      evalMeanT in class Markovian
      Parameters:
      t - the time value
      Returns:
      the mean number of arrivals by time t
    • evalVarT

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

      public Matrix evalACFT(int[] lags, double timescale)
      Evaluates the autocorrelation function at given lags and timescale. For MAP, this measures the correlation between arrivals at different times.
      Overrides:
      evalACFT in class MarkovModulated
      Parameters:
      lags - array of lag values
      Returns:
      matrix of autocorrelation values
    • evalPDF

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

      public void normalize()
      Normalizes the MAP so that D0+D1 forms a proper infinitesimal generator. Each row sum of (D0+D1) should equal zero for a valid generator.
    • fitCentralAndACFDecay

      public static MAP fitCentralAndACFDecay(double mean, double var, double skew, double gamma2)
      Fit MAP from central moments and autocorrelation function decay. This creates a MAP that matches the given statistical properties.
      Parameters:
      mean - the mean inter-arrival time
      var - the variance of inter-arrival times
      skew - the skewness of inter-arrival times
      gamma2 - the autocorrelation function decay parameter
      Returns:
      fitted MAP process
    • fitRawMomentsAndACFDecay

      public static MAP fitRawMomentsAndACFDecay(double m1, double m2, double m3, double gamma2)
      Fit MAP from raw moments and autocorrelation function decay. Delegates to MMPP2.fitRawMomentsAndACFDecay(double, double, double, double) and returns the fitted MMPP(2) as a 2-phase MAP. A failure of that fit propagates to the caller: it is not replaced by an exponential, which would match the mean only.
      Parameters:
      m1 - first raw moment
      m2 - second raw moment
      m3 - third raw moment
      gamma2 - autocorrelation function decay parameter
      Returns:
      fitted MAP process
    • toString

      public String toString()
      Returns a string representation of this MAP process.
      Overrides:
      toString in class Object
      Returns:
      string representation showing dimensions and basic properties
    • equals

      public boolean equals(Object obj)
      Checks if this MAP 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 MAP process.
      Overrides:
      hashCode in class Object
      Returns:
      hash code based on matrix contents