![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Extended Schmidt MVA with queue-aware alpha corrections. More...
#include <cstddef>#include <vector>#include "line/api/pfqn/pfqn_amva_common.h"#include "line/api/pfqn/pfqn_schmidt.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"#include "line/util/population.h"Go to the source code of this file.
Classes | |
| struct | line::pfqn::SchmidtExtResult< T > |
| Return value of pfqn_schmidt_ext, mirroring [XN,QN,UN,CN]. More... | |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| template<class T> | |
| SchmidtExtResult< T > | line::pfqn::pfqn_schmidt_ext (const Matrix< T > &D, const std::vector< int > &N, const Matrix< int > &S, const std::vector< SchedStrategy > &sched) |
| Extended Schmidt MVA with queue-aware alpha corrections. | |
Extended Schmidt MVA with queue-aware alpha corrections.
Templated port of matlab/src/api/pfqn/pfqn_schmidt_ext.m, cross-checked against the second half of jar/src/main/java/jline/api/pfqn/mva/ Pfqn_schmidt_amva.java (that file carries both the plain and the extended recursion). The Java entry point takes SERVICE RATES and inverts them to demands internally, where MATLAB and this port take demands; that is an API divergence, not an algorithmic one. Reference: R. Schmidt, "An approximate MVA algorithm for exponential, class-dependent multiple server stations", Performance Evaluation 29(4), 1997.
The population recursion is the one of pfqn_schmidt. What the extension adds is the mean service time B_c(n) used at a class-dependent multiserver FCFS station. Plain Schmidt weights the composition n by the demands themselves,
B_c(n) = D(i,c) + max(0, |n| - s) / (s (|n| - 1)) (sum_t n_t D(i,t) - D(i,c));
the extension replaces the second term by max(0, |n| - s) times a mean INTERDEPARTURE time read off an auxiliary solve. For each class r a tagged single-job class R+1 is appended at station i with that station's class-r demand, the population is dropped to N - e_r, plain pfqn_schmidt is run on the (R+1)-class model, and its utilizations u give
alpha(i) = sum_{s<=R} u(i,s) - u(i,R+1), 1/interdep = s sum_{s: D(i,s)>0} (u(i,s)/alpha(i)) / D(i,s),
i.e. a demand-weighted harmonic mean over the classes actually competing for the servers, with the tagged job's own utilization removed. That is the "queue-aware" correction: the departure rate seen by a waiting job reflects the class mix at the station rather than its own demand.
Reference behaviour preserved verbatim: the alphas are computed only for FCFS stations whose demands are class dependent, and used only where N_c > 1; the class-independent multiserver marginal is the binomial form of the reference, not the recursive one of plain Schmidt; the idle-state probability is floored at 1e-12 (2.2e-16 for the PS branch); and the servers used in the queue-length update block are read with the class index left over from the preceding loop, which for an (M x R) server matrix is the LAST class. That last item is a reference quirk, reproduced because it selects the numbers the reference produces; it is inert whenever the server counts do not vary by class.
The extra SchedStrategy.FCFS that the reference appends to sched before the auxiliary solve is dropped here: it lengthens the vector to M + 1 for an M-station model and pfqn_schmidt never reads past M, so it is inert.
The auxiliary solve widens the model to R + 1 classes, so a per-class server matrix cannot be carried into it; the reference indexes S(ist,c) with c = R + 1 and would raise an out-of-bounds error. This port therefore requires a per-station (M x 1) server vector whenever any alpha is needed, and says so rather than inventing a widening rule.
Arithmetic: INEXACT BY CONSTRUCTION. The correction is an approximation whose alpha factors come from an auxiliary approximate solve, and the marginal probabilities use non-integer binomial powers; it is gated on has_transcendental accordingly. Plain pfqn_schmidt, being a finite rational recursion, stays instantiable at Rational and is not gated.
Definition in file pfqn_schmidt_ext.h.