LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
cache_metrics.h File Reference

What a solver observed about the Cache nodes of a model. More...

#include <cmath>
#include <cstddef>
#include <limits>
#include <map>
#include <string>
#include <vector>
#include "line/lang/qn/network_struct.h"
#include "line/util/matrix.h"
Include dependency graph for cache_metrics.h:

Go to the source code of this file.

Classes

struct  line::solvers::CacheNodeMetrics< T >
 One Cache node's measured behaviour. More...
struct  line::solvers::CacheMetrics< T >
 Every Cache node of the model, in node order; empty on a model with none. More...

Namespaces

namespace  line
namespace  line::solvers

Functions

template<class T>
CacheMetrics< T > line::solvers::cache_metrics_of (const qn::NetworkStruct< T > &sn, const std::vector< T > &hitprob, const std::vector< T > &missprob, const std::vector< T > &delayedprob, const std::vector< T > &latency, const Matrix< T > &hitproblist, const Matrix< T > &itemprob, const std::vector< T > &listcost)
 Assemble CacheMetrics from what a cache analyzer returned.
template<class T>
CacheMetrics< T > line::solvers::cache_metrics_of_matrix (const qn::NetworkStruct< T > &sn, const Matrix< T > &hitprob, const Matrix< T > &missprob)
 The same, for the integrated caching-queueing branch, whose hit and miss probabilities are (ncaches x nclasses) rather than one vector per model.

Detailed Description

What a solver observed about the Cache nodes of a model.

THE AvgTable CANNOT CARRY THIS AND IS NOT MEANT TO. A cache's answer is a hit probability per (node, read class), a per-list breakdown of it, and a per-item occupancy – three different index spaces, none of them (station, class). The reference keeps them in getAvgCacheTable and getAvgItemTable for exactly that reason, and this struct is what those two tables are built from.

EVERY FIELD IS OPTIONAL AND ABSENT MEANS NOT COMPUTED, never zero. A hit probability of 0 is a cache that never hits; an empty vector is a solver that did not measure one, and the tables print NaN there. The distinction matters because the four cache branches of SolverNC compute different subsets: the integrated caching-queueing network gives hit and miss but no per-item law, the non-reentrant Source-Cache-Sink model gives the per-item law and the per-list breakdown, and only the retrieval branches give a delayed-hit fraction at all.

Definition in file cache_metrics.h.