![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Two approximate MVA schemes: Queue-Line and Fraction-Line. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <vector>#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::pfqn::WsResult< T > |
| What an approximate MVA sweep reports. More... | |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Enumerations | |
| enum class | line::pfqn::WsScheme { line::pfqn::Qli = 0 , line::pfqn::Fli } |
| Which arrival-queue correction the sweep applies. More... | |
Functions | |
| template<class T> | |
| WsResult< T > | line::pfqn::pfqn_wangsevcik (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, WsScheme scheme, double tol=1e-6, std::size_t max_iter=1000) |
| One approximate MVA sweep, by the chosen arrival-queue correction. | |
| template<class T> | |
| WsResult< T > | line::pfqn::pfqn_qli (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, double tol=1e-6, std::size_t max_iter=1000) |
| Wang-Sevcik Queue-Line. | |
| template<class T> | |
| WsResult< T > | line::pfqn::pfqn_fli (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, double tol=1e-6, std::size_t max_iter=1000) |
| Wang-Sevcik Fraction-Line. | |
Two approximate MVA schemes: Queue-Line and Fraction-Line.
Port of pfqn_qli and pfqn_fli from python/line_solver/api/pfqn/mva.py. PYTHON-ONLY: neither MATLAB nor the JAR carries them as standalone entry points, so native Python is the reference.
Reference: W. Wang and K. C. Sevcik, "Performance Models for Multiprogrammed Systems", IBM Research Report RC 5925, 1976.
pfqn_qdlin USED TO LIVE HERE AND NO LONGER DOES. Its Wang-Sevcik arm scaled the job's own-class contribution by (N_r - 1)/N_r and left the other classes alone, which is Bard-Schweitzer written out, so the function reproduced pfqn_bs to iteration tolerance and was neither a Linearizer nor queue-dependent. It is now line/api/pfqn/pfqn_qdlin.h, the array-level twin of what SolverMVA computes for method='qdlin'.
BOTH ANSWER ONE QUESTION: what queue does an ARRIVING class-r job see? Exact MVA says it sees the queue at population N - e_r, which is why the exact recursion has to walk the whole population lattice. Every approximation here replaces that by a correction applied to the queue at the FULL population, and the two differ only in the correction:
THE Q_seen FLOOR AT ZERO IS LOAD-BEARING, not defensive. Both Wang-Sevcik corrections are differences of estimates and can go negative at a lightly loaded station; a negative queue would make the residence time SHORTER than the service demand, which is impossible, and the iteration then diverges away from the fixed point rather than toward it. The reference clamps and so does this.
THE FALLBACK ARM IS NOT THE SAME FORMULA. When the denominator vanishes, or when the population is too small for the correction's own divisor (N_r > 1 for QLI), the reference falls back to Q_total - Q_own, i.e. the other classes only. That is the Bard-Schweitzer arrival estimate, and it is a DIFFERENT approximation, so a caller comparing two runs across that boundary is comparing two schemes.
ARITHMETIC: field.
Definition in file pfqn_wangsevcik.h.