![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The Gt/Mt/st+GI many-server fluid queue, and the network of them. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <functional>#include <vector>#include "line/api/qsys/qsys_types.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::qsys::QsysTvFluidResult< T > |
| Trajectory of the Gt/Mt/st+GI fluid queue; every vector is on the time grid. More... | |
| struct | line::qsys::TvFluidOptions< T > |
| Options of qsys_gtmtst_fluid, all with the MATLAB defaults. More... | |
| struct | line::qsys::NpfqnTvFluidResult< T > |
| Result of the network solve. More... | |
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class Tv> | |
| QsysTvFluidResult< Tv > | line::qsys::qsys_gtmtst_fluid (const std::function< Tv(const Tv &)> &lambdaFun, const std::function< Tv(const Tv &)> &sFun, const std::function< Tv(const Tv &)> &muFun, const std::function< Tv(const Tv &)> &patienceCcdf, const Tv &T, const TvFluidOptions< Tv > &opts=TvFluidOptions< Tv >()) |
| The Gt/Mt/st+GI many-server fluid queue, and the network of them. | |
| template<class Tv> | |
| NpfqnTvFluidResult< Tv > | line::qsys::npfqn_gtmtst_fluid (const std::vector< std::function< Tv(const Tv &)> > &lambdaFuns, const std::vector< std::function< Tv(const Tv &)> > &sFuns, const std::vector< std::function< Tv(const Tv &)> > &muFuns, const std::vector< std::function< Tv(const Tv &)> > &patienceCcdfs, const std::vector< std::vector< Tv > > &P, const Tv &T, const Tv &dt=num_traits< Tv >::from_int(0), const std::vector< Tv > &B0=std::vector< Tv >(), const std::vector< Tv > &w0=std::vector< Tv >(), double tol=1e-6, std::size_t maxIter=100) |
| A time-varying open network of many-server fluid queues with abandonment. | |
The Gt/Mt/st+GI many-server fluid queue, and the network of them.
Templated port of matlab/src/api/qsys/qsys_gtmtst_fluid.m and matlab/src/api/npfqn/npfqn_gtmtst_fluid.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_gtmtst_fluid.java.
Time-varying arrival rate lambda(t), staffing s(t), exponential service at rate mu(t), general patience with ccdf F^c, unlimited waiting room.
THE MODEL ALTERNATES BETWEEN TWO REGIMES and the algorithm is the bookkeeping of that alternation:
UNDERLOADED the queue is empty, every arrival enters service at once, and B' = lambda(t) - mu(t)B(t) (18, Mt form) ends when B reaches s while lambda > Gamma (15) OVERLOADED B(t) = s(t), fluid enters service at exactly Gamma(t) = s'(t) + s(t)mu(t) (13) q(t,x) = lambda(t-x)F^c(x) for x <= w(t) (20) w'(t) = 1 - Gamma(t)/[lambda(t-w(t))F^c(w(t))] (21) ends when w returns to 0 with lambda <= Gamma (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.
THE NETWORK IS A FIXED POINT. lambda_j = lambda_j^0 + sum_i sigma_i P_ij with sigma_i = mu_i B_i (23)-(24), iterated from the external rates; the nth iterate is the fluid that has made n transitions, and the map is a monotone contraction, so the rates increase to the fixed point. Only the SERVICE COMPLETION flow is routed: abandoning fluid leaves the network, which is what makes the traffic equations linear in sigma.
ARITHMETIC. RK4 on a grid against a tolerance, so nothing is exact; the instantiation is restricted to the transcendental types.
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 J. on Computing 26(1), 59-73.
Definition in file qsys_gtmtst_fluid.h.