![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Shift the load-dependent service-rate lattice of selected stations. More...
#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.
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| template<class T> | |
| Matrix< T > | line::pfqn::pfqn_mushift (const Matrix< T > &mu, const std::vector< std::size_t > &iset) |
| Shift the load-dependent service-rate lattice of selected stations. | |
| template<class T> | |
| Matrix< T > | line::pfqn::pfqn_mushift (const Matrix< T > &mu, std::size_t i) |
| Single-station overload, the form the reference is actually called with. | |
Shift the load-dependent service-rate lattice of selected stations.
Templated port of matlab/src/api/pfqn/pfqn_mushift.m, cross-checked against jar/src/main/java/jline/api/pfqn/ld/Pfqn_mushift.java.
The load-dependent convolution and MVA recursions need mu(i, n+1) when a job is added at station i. This drops the first column of that station's rate row and the last column of every other row, giving an (M x N-1) lattice in which station i is "one job ahead":
mushifted(i, j) = mu(i, j+1) for the shifted stations mushifted(m, j) = mu(m, j) otherwise, j = 1 .. N-1
Arithmetic: EXACT-CAPABLE. The routine only copies entries, so it is exact in every arithmetic and carries no transcendental gate.
Note on the MATLAB loop. The reference recomputes the whole matrix inside a loop over iset, so with more than one index only the LAST one is actually shifted; every earlier one is overwritten. That is a defect, not a convention – the routine's own name and its single caller (one station at a time) say each listed station should be shifted – so this port shifts every station in iset. With the single-element iset that the reference is called with, the two agree exactly.
Definition in file pfqn_mushift.h.