![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Steady state of the RANDOM(m) multi-list mean field. More...
#include <cstddef>#include <vector>#include "line/api/cache/cache_rrm_meanfield_ode.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/ode.h"Go to the source code of this file.
Classes | |
| struct | line::cache::CacheRrmMeanfieldResult< T > |
| Return value of cache_rrm_meanfield. More... | |
Namespaces | |
| namespace | line |
| namespace | line::cache |
Functions | |
| template<class T> | |
| CacheRrmMeanfieldResult< T > | line::cache::cache_rrm_meanfield (const std::vector< T > &lambda, const std::vector< int > &m, const T &tmax) |
| Steady state of the RANDOM(m) multi-list mean field. | |
| template<class T> | |
| CacheRrmMeanfieldResult< T > | line::cache::cache_rrm_meanfield (const std::vector< T > &lambda, const std::vector< int > &m) |
| cache_rrm_meanfield with the reference horizon tmax = 1e4. | |
Steady state of the RANDOM(m) multi-list mean field.
Port of matlab/src/api/cache/cache_rrm_meanfield.m, which is a SCRIPT rather than a function: it fixes n = 7 items, m = [1 1 3], a fixed popularity vector and a fixed initial condition, integrates the drift of cache_rrm_meanfield_ode.m with ode23s over [0,10000] and prints the terminal occupancy, the miss rate lambda*x(:,1) and the miss ratio. This header is that computation with the data as arguments.
The right-hand side was already ported (cache_rrm_meanfield_ode.h) and noted there that the steady state needed a stiff integrator that the port did not have. It now does: line/util/ode.h. The Jacobian is not written out here – the drift is bilinear, so a numeric central-difference Jacobian is accurate to about eps^(2/3) and the integrator forms it itself; that is the deliberate choice, since unlike cache_miss_rmf nothing downstream needs an exact Jacobian and an analytic one would be a second expression of the same formula to keep in step with the first.
The initial condition is the reference's: every item outside the cache, x(k,0) = 1. Integrating from there to t = 1e4 is exactly what cache_rrm_meanfield.m does.
ARITHMETIC. Gated: the answer is the limit of a tolerance-driven integration.
Definition in file cache_rrm_meanfield.h.