Class Pfqn_respt_ps_moments

java.lang.Object
jline.api.pfqn.Pfqn_respt_ps_moments

public class Pfqn_respt_ps_moments extends Object
Sojourn-time moments at the processor-sharing station of the closed terminal-driven system of Mitra and Morrison (1983): a bank of terminals in series with a single processor-sharing CPU, with class-dependent exponential think times (mean Z[r]) and class-dependent exponential service times (mean S[r]), and N[r] jobs of class r cycling between the two.

Two routes to the moments are implemented, both from that paper.

exact solves the linear system c'[A - q_J I] = -pi'B of Proposition 3 on the state space {n : 0 <= n <= K}, K being the population vector with the tagged class decremented by one. The moments are then E[W_J] = sum_n c(n) and (q_J/2) E[W_J^2] = sum_n (n'1+1) c(n). Exact to solver precision, at the cost of a linear solve of dimension prod_r (K[r]+1).

asymptotic evaluates the two leading terms of the asymptotic expansion in inverse powers of the large parameter Nexp = max_r Z[r]/S[r], E[W_J^2] ~ c0 + c1/Nexp, of Proposition 6. The cost is a linear system of dimension R, the number of classes, and is therefore independent of the populations. Note that the expansion parameter is the think-to-service ratio and NOT the population, so a model with short think times is expanded in a small parameter no matter how many jobs it holds.

auto takes the exact route when the state space has at most AUTO_MAX states and the asymptotic route otherwise.

The asymptotic route requires the normal-usage condition alpha > 0. Where it fails and the exact route is not affordable, the entry of W and W2 is NaN and the result records "unavailable"; asking for "asymptotic" explicitly in that regime throws rather than returning a blank.

Reference: D. Mitra, J. A. Morrison, "Asymptotic Expansions of Moments of the Waiting Time in Closed and Open Processor-Sharing Systems with Multiple Job Classes", Adv. Appl. Prob. 15(4):813-839, 1983, Propositions 3 and 6.

Port of MATLAB pfqn_respt_ps_moments.m.

  • Field Details

    • AUTO_MAX

      public static final int AUTO_MAX
      State-space size below which the auto route goes exact.
      See Also:
    • EXACT_MAX

      public static final int EXACT_MAX
      Hard bound on an explicitly requested exact solve.
      See Also:
  • Method Details

    • pfqn_respt_ps_moments

      public static PfqnResptPsResult pfqn_respt_ps_moments(double[] S, double[] N, double[] Z)
      Sojourn-time moments at the PS station, choosing the route automatically.
      Parameters:
      S - per-class mean service times at the PS station, positive
      N - per-class populations, non-negative integers
      Z - per-class mean think times, positive where N > 0
      Returns:
      per-class moments and the route taken
    • pfqn_respt_ps_moments

      public static PfqnResptPsResult pfqn_respt_ps_moments(double[] S, double[] N, double[] Z, String method)
      Sojourn-time moments at the PS station.
      Parameters:
      S - per-class mean service times at the PS station, positive
      N - per-class populations, non-negative integers
      Z - per-class mean think times, positive where N > 0
      method - "auto", "exact" or "asymptotic"
      Returns:
      per-class moments and the route taken