Package jline.api.sim

Class Sim_prio_tailquantile

java.lang.Object
jline.api.sim.Sim_prio_tailquantile

public final class Sim_prio_tailquantile extends Object
Tail quantile of the steady-state sojourn time per class in a non-preemptive priority M/M/1 queue, by regenerative simulation with importance sampling.

K classes, Poisson arrivals of rate lambda[k], exponential service of rate mu[k], one server, NON-PREEMPTIVE priority with class 1 (index 0) highest and FCFS within a class. For a level p close to 1 the p-quantile Q_k(p) of the response time of each class is estimated with Algorithm 1 of Guang et al.:

  1. m2 plain regenerative cycles estimate E[alpha_k], the mean number of class-k jobs per cycle;
  2. the adaptive cross-entropy method learns exponential importance rates, raising a level gamma_t (the (1-rho) sample quantile of the per-cycle maximum class-k response time) until it passes Q_k(p) (Remark 1 test) or a given gammaMax; without gammaMax the CE cycles stay under the importance rates for their whole length while those are stable (sum lambda~/mu~ < 0.95) and the switching level below is the eq. (8) pilot quantile of the last CE batch;
  3. m1 cycles are sampled under a SWITCHING change of measure: importance rates until the arrival of the first class-k job whose lower bound R' (own service, queued class <= k work and the residual service) exceeds gammaMax, original rates after it; each class-k job carries the likelihood ratio at its enter-service epoch;
  4. Q^ = R_(n_p), n_p = min{n : sum_{i>=n} L_(i) <= (1-p)(m1/m2) sum alpha_k} (eq. 8), with a batching interval over r batches (Section 4) whose half-width uses the Student-t quantile with r - 1 degrees of freedom: Section 4 prints the normal 1.96, the r -> infinity limit, which covers only 92% at r = 10.

The random numbers come from one MRG32k3a stream in L'Ecuyer's double-precision form, seeded and consumed exactly as in MATLAB, Python and C++, so the four agree for the same seed up to last-ulp differences of log().

Port of MATLAB sim_prio_tailquantile.m.

Reference: J. Guang, G. Hong, X. Chen, X. Peng, L. Chen, B. Bai, G. Zhang, "Tail quantile estimation for non-preemptive priority queues", Proc. Winter Simulation Conference 2022, 85-96.

Since:
LINE 3.1.0
  • Method Details

    • sim_prio_tailquantile

      public static List<Sim_prio_tailquantile.Result> sim_prio_tailquantile(double[] lambda, double[] mu, double p)
      One run with the default options.
    • sim_prio_tailquantile

      public static List<Sim_prio_tailquantile.Result> sim_prio_tailquantile(double[] lambda, double[] mu, double p, Sim_prio_tailquantile.Options opt)
      Estimates the p-quantile of the response time of each target class.
      Parameters:
      lambda - arrival rates, one per class (class 0 highest priority)
      mu - service rates, one per class
      p - quantile level in (0,1)
      opt - procedure options
      Returns:
      one result per target class, in the order of opt.classes