Class MPH

All Implemented Interfaces:
Serializable, Copyable

public class MPH extends MarkedMAP implements Serializable
A Marked Phase-Type distribution (MPH).

A PH whose absorption is LABELLED: the chain runs on h transient phases with entry law alpha and sub-generator S, and absorption happens through one of K exit vectors s_1, ..., s_K, so a completion carries both a duration and the mark of the exit that produced it. The partition identity is

  sum_k s_k = -S e
which is what makes the K exits account for exactly the absorption the sub-generator leaves, no more and no less.

An MPH is the RENEWAL special case of an MMAP. Lowering it by

  D0 = S,   D1k = s_k alpha,   D1 = sum_k D1k = (-S e) alpha
gives a marked Markovian arrival process whose successive intervals are independent and PH(alpha, S) distributed, because D1k(i, j) factorises through alpha and so the phase after an event does not depend on the phase before it. That is exactly the cell this class hands to MarkedMAP, so every consumer of the M3A layout {D0, D1_agg, D11, ..., D1K} serves an MPH unchanged and no separate sampler, serializer or state machinery is needed.

It nevertheless carries a ProcessType.MPH of its own rather than aliasing MMAP, so a solver that cannot honour a marked renewal process refuses it by name instead of inheriting MMAP's support. Because this class extends MarkedMAP, any dispatch that tests instanceof MarkedMAP must test MPH FIRST or it will tag a marked PH as an ordinary MMAP; that is the same ordering trap BMAP already carries.

At a Source the mark selects the class of the arriving job (Source.setMarkedArrival, sn.markidx). As a SERVICE process it is sampled for its duration and the mark is discarded, exactly as an MMAP is.

Reference: Q.-M. He, "The versatility of MMAP[K] and the MMAP[K]/G[K]/1 queue", Queueing Systems 38(4), 2001.

See Also:
  • Constructor Details

    • MPH

      public MPH(Matrix alpha, Matrix S, List<Matrix> exit)
      Creates a marked phase-type distribution.
      Parameters:
      alpha - 1-by-h entry law, non-negative and summing to one
      S - h-by-h sub-generator: non-negative off-diagonal, negative diagonal
      exit - the K exit vectors, each h-by-1 and non-negative, with sum_k s_k = -S e
  • Method Details

    • getAlpha

      public Matrix getAlpha()
      The 1-by-h entry law.
    • getSubgenerator

      public Matrix getSubgenerator()
      The h-by-h sub-generator.
      Overrides:
      getSubgenerator in class Markovian
    • getExitVector

      public Matrix getExitVector(int k)
      The h-by-1 exit vector of mark k.
      Parameters:
      k - the 1-based mark index
      Returns:
      the exit vector
    • getExitVectors

      public List<Matrix> getExitVectors()
      The exit vectors, ordered by mark.
    • getNumberOfPhases

      public long getNumberOfPhases()
      Number of transient phases. Widens Markovian.getNumberOfPhases, which returns long.
      Overrides:
      getNumberOfPhases in class Markovian
      Returns:
      the number of phases
    • toPH

      public PH toPH()
      The UNMARKED phase-type distribution of the duration, PH(alpha, S).

      Hiding the marks leaves the interval law untouched, which is what separates an MPH from a general MMAP: the aggregate of an MMAP is a MAP, and only here is it a renewal process with a phase-type marginal.

      Returns:
      the duration's PH law
    • getMarkProbabilities

      public double[] getMarkProbabilities()
      The probability that a completion carries mark k, alpha (-S)^-1 s_k.

      Successive completions are independent, so this is both the long-run fraction of mark-k completions and the probability of any one of them.

      Returns:
      the K mark probabilities, ordered by mark