Class Solver_ssa_analyzer_tstep

java.lang.Object
jline.solvers.ssa.analyzers.Solver_ssa_analyzer_tstep

public final class Solver_ssa_analyzer_tstep extends Object
Fixed-increment (time-stepped) approximate simulation of a Markovian queueing network: SolverSSA method tstep. Port of MATLAB solver_ssa_analyzer_tstep, ssa_tstep_feature_set and ssa_tstep_refusal.

Reference: T. Wang, Y. Song and L. J. Hong, "Fast approximation to discrete-event simulation of Markovian queueing networks", Proc. 2023 Winter Simulation Conference, pp. 3613-3624 (WanSH23), Algorithm 1.

The horizon is cut into steps of length h and the per-(station, class) job counts are advanced once per step from the events of that step; arrivals (external and routed) are applied at the END of the step:

  • Delay: d ~ Bin(n, 1-exp(-mu h));
  • single-class FCFS/SIRO/PS with c servers: b = min(n,c), m1 ~ Bin(b, p1), m2 ~ Bin(min(m1, n-b), p2), d = m1 + m2, with x = mu h, p1 = 1-e^-x, p2 = (1-e^-x (1+x))/(1-e^-x);
  • multiclass PS (extension): d_r ~ Bin(n_r, 1-exp(-mu_r min(n,c)/n h));
  • Source: a_r ~ Poisson(lambda_r h).

Departures are routed by one multinomial per (station, class) row over the station routing matrix (SnRtStations), drawn as conditional binomials; mass routed to the Source exits. QN averages the counts at the step starts after warmup, TN counts departures per unit time, UN = QN at Delays and TN/(mu c) elsewhere, RN = QN/TN, XN = TN at the reference station, CN = N/XN. The method is an APPROXIMATION with O(h) bias; it records no sample path.

Random numbers come from Maths.rand(), the generator every SSA engine of the JAR draws from and that SolverSSA.runAnalyzer reseeds from options.seed. Binomial variates use inversion when n*min(p,1-p) < 10 and Hormann's BTRS otherwise; Poisson variates inversion below a mean of 10 and Hormann's PTRS otherwise, so a step costs O(1) per row whatever the counts.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String[]
    Feature envelope of the tstep method (MATLAB ssa_tstep_feature_set).
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    binomial(long n, double p)
    Binomial(n, p) variate: inversion when n*min(p,1-p) < 10, else BTRS (Hormann 1993, "The generation of binomial random variates").
    static FeatureSet
     
    static long
    poisson(double lambda)
    Poisson(lambda) variate: inversion when lambda < 10, else PTRS (Hormann 1993, "The transformed rejection method for generating Poisson random variables").
    static String
    Structural rules the feature set cannot state (MATLAB ssa_tstep_refusal): one class per FCFS/SIRO station, finite positive rates at every visited (station, class), finite server counts at FCFS/SIRO/PS stations.
    static SSAResult
    Runs the time-stepped approximation.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ALLOWED

      public static final String[] ALLOWED
      Feature envelope of the tstep method (MATLAB ssa_tstep_feature_set).
  • Method Details

    • featureSet

      public static FeatureSet featureSet()
      Returns:
      the tstep feature set
    • refusal

      public static String refusal(NetworkStruct sn)
      Structural rules the feature set cannot state (MATLAB ssa_tstep_refusal): one class per FCFS/SIRO station, finite positive rates at every visited (station, class), finite server counts at FCFS/SIRO/PS stations.
      Parameters:
      sn - network structure
      Returns:
      empty string if accepted, else the reason
    • solver_ssa_analyzer_tstep

      public static SSAResult solver_ssa_analyzer_tstep(NetworkStruct sn, SolverOptions options)
      Runs the time-stepped approximation.
      Parameters:
      sn - network structure (after the SSA analyzer's PH/MAP preprocessing)
      options - solver options; config.warmupfrac must already be resolved
      Returns:
      SSAResult with QN, UN, RN, TN, CN, XN (no sample path)
    • binomial

      public static long binomial(long n, double p)
      Binomial(n, p) variate: inversion when n*min(p,1-p) < 10, else BTRS (Hormann 1993, "The generation of binomial random variates").
    • poisson

      public static long poisson(double lambda)
      Poisson(lambda) variate: inversion when lambda < 10, else PTRS (Hormann 1993, "The transformed rejection method for generating Poisson random variables").