LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
cache_t_lrum_map.m
1%{ @file cache_t_lrum_map.m
2 % @brief Characteristic times for LRU(m) caches under MAP request streams
3 %
4 % @author LINE Development Team
5%}
6
7%{
8 % @brief Characteristic times for the LRU(m)-MAP TTL approximation
9 %
10 % @details
11 % TTL approximation of LRU(m) with per-item Markovian arrival processes
12 % (Gast and Van Houdt, Performance Evaluation 2017, Section 3.1.2). Each
13 % item is modeled by an embedded Markov chain over (list, phase) states;
14 % the level vectors obey pi_l = pi_0 prod_s R_s with the R-recursions of
15 % eqs. (6)-(7) and pi_0 the left Perron vector of R_1 expm(D0 T_1). The
16 % characteristic times T_1..T_h equate the expected occupancy of each
17 % list to its capacity; the joint root is found by fsolve on log(T).
18 %
19 % @par Syntax:
20 % @code
21 % t = cache_t_lrum_map(D0c, D1c, m)
22 % @endcode
23 %
24 % @par Parameters:
25 % <table>
26 % <tr><th>Name<th>Description
27 % <tr><td>D0c<td>Cell (1,n); D0c{k} is the (d,d) hidden-transition matrix of item k
28 % <tr><td>D1c<td>Cell (1,n); D1c{k} is the (d,d) arrival matrix of item k
29 % <tr><td>m<td>Cache capacity vector (1,h)
30 % </table>
31 %
32 % @par Returns:
33 % <table>
34 % <tr><th>Name<th>Description
35 % <tr><td>t<td>Characteristic time of each list (1,h)
36 % </table>
37%}
38function t = cache_t_lrum_map(D0c, D1c, m)
39n = numel(D0c);
40h = numel(m);
41
42 function F = capres(y)
43 T = exp(y);
44 occ = zeros(1, h);
45 for k = 1:n
46 [~, occk] = cache_lrum_map_levelstats(D0c{k}, D1c{k}, T);
47 occ = occ + occk;
48 end
49 F = occ - m(:)';
50 end
51
52options = optimoptions('fsolve', 'MaxIter', 1e4, 'MaxFunEvals', 1e5, 'Display', 'off');
53y = fsolve(@capres, zeros(1, h), options);
54t = exp(y);
55end
Definition Station.m:245