Class Qsys_gtmtst_fluid

java.lang.Object
jline.api.qsys.Qsys_gtmtst_fluid

public final class Qsys_gtmtst_fluid extends Object
The Gt/Mt/st+GI many-server fluid queue.

Time-varying arrival rate lambda(t), time-varying staffing s(t), exponential service at the time-varying rate mu(t), general patience with complementary cdf F^c, and unlimited waiting room.

THE MODEL ALTERNATES BETWEEN TWO REGIMES, and the whole algorithm is the bookkeeping of that alternation:

  • UNDERLOADED: the queue is empty and every arrival enters service at once, so the system is the infinite-server fluid model and B obeys B'(t) = lambda(t) - mu(t)B(t) (eq. 18 in its Mt form). It ends when B reaches s while lambda exceeds the rate Gamma(t) = s'(t) + s(t)mu(t) at which capacity frees up (eq. 15).
  • OVERLOADED: every server is busy, B(t) = s(t), fluid enters service at exactly Gamma(t), and the queue is described by its BOUNDARY WAITING TIME w(t), the age of the oldest fluid still waiting. Content of age x is what arrived x ago and has not abandoned, q(t,x) = lambda(t-x)F^c(x), and the boundary moves by the delay differential equation (eq. 21) w'(t) = 1 - Gamma(t)/[lambda(t-w(t)) F^c(w(t))]. It ends when w returns to 0 with lambda no longer above Gamma (eq. 14).

WHY w AND NOT Q. The queue content is a functional of w, but not the other way round: two systems with the same Q and different age profiles abandon at different rates. Tracking the boundary keeps the age profile exact, which is what makes a general patience law admissible at all.

Port of MATLAB qsys_gtmtst_fluid.m.

Reference: Y. Liu, W. Whitt (2012). The Gt/GI/st+GI many-server fluid queue. Queueing Systems 71, 405-444; Y. Liu, W. Whitt (2014). Algorithms for time-varying networks of many-server fluid queues. INFORMS Journal on Computing 26(1), 59-73.

Since:
LINE 3.1.0
  • Method Details

    • qsys_gtmtst_fluid

      public static QsysTvFluidResult qsys_gtmtst_fluid(DoubleUnaryOperator lambdaFun, DoubleUnaryOperator sFun, DoubleUnaryOperator muFun, DoubleUnaryOperator patienceCcdf, double T)
      The fluid queue started empty, on a grid of T/2000.
      Parameters:
      lambdaFun - arrival rate lambda(t)
      sFun - staffing s(t)
      muFun - service rate mu(t)
      patienceCcdf - F^c(x) = P(patience > x)
      T - horizon
      Returns:
      the trajectory
    • qsys_gtmtst_fluid

      public static QsysTvFluidResult qsys_gtmtst_fluid(DoubleUnaryOperator lambdaFun, DoubleUnaryOperator sFun, DoubleUnaryOperator muFun, DoubleUnaryOperator patienceCcdf, double T, double dt, double B0, double w0, DoubleUnaryOperator sPrimeFun, DoubleUnaryOperator patiencePdf, DoubleUnaryOperator lambdaPast)
      Parameters:
      lambdaFun - arrival rate lambda(t)
      sFun - staffing s(t)
      muFun - service rate mu(t)
      patienceCcdf - F^c(x) = P(patience > x)
      T - horizon
      dt - grid step
      B0 - fluid in service at time 0
      w0 - boundary waiting time at time 0
      sPrimeFun - s'(t), or null to differentiate sFun numerically
      patiencePdf - the patience density, or null to difference the ccdf
      lambdaPast - the arrival rate before time 0, or null for lambdaFun
      Returns:
      the trajectory
    • interp

      public static double interp(double[] xs, double[] ys, double x)
      Linear interpolation on an increasing grid, clamped at both ends. Public because the network solver feeds each queue its interpolated arrival rate.
      Parameters:
      xs - the grid, increasing
      ys - the values on that grid
      x - where to interpolate
      Returns:
      the interpolated value