2 % @brief Exact recurrence
for the normalizing constant of a delayed-hit (list-based) cache
4 % @author LINE Development Team
8 % @brief Computes the delayed-hit cache normalizing constant E(v,m) by the exact recurrence
11 % This function recursively computes the normalizing constant E(v,m) of a
12 % list-based cache with delayed hits, whose retrieval system has one IS station
13 % (index s=0) and r PS stations (s=1,...,r),
using the exact recurrence relation
15 % E(v,m) = (1 + lambda_k*eta_{0,k}) E_k(v,m)
16 % + sum_{s=1}^{r} lambda_k*eta_{s,k}*(v_s+1) E_k(v+1_s, m)
17 % + sum_{j=1}^{h} m_j*gamma_{k,j} E_k(v, m-1_j)
19 % where E_k
is the same constant
for the system without item k. Boundary
20 % conditions are E = 1
if there are no items left and E = 0
if sum_j m_j exceeds
21 % the number of items or any m_j < 0. The plain normalizing constant
is recovered
26 % E = retrieval_nc(v, m, lambda, eta, gamma)
31 % <tr><th>Name<th>Description
32 % <tr><td>v<td>Moment-order vector for the PS stations (zeros(1,r) for the plain constant)
33 % <tr><td>m<td>Cache list capacities
34 % <tr><td>lambda<td>Per-item arrival rates
35 % <tr><td>eta<td>Fetching demands eta(i,s+1)=eta_{s,i} (column 1 = IS station s=0, columns 2..r+1 = PS stations). A PS column models any symmetric/identical-rate single-server discipline (PS, SIRO, FCFS, LCFS-PR), insensitive to the per-list service order.
36 % <tr><td>gamma<td>Access factors gamma(i,j)=gamma_{i,j}
41 % <tr><th>Name<th>Description
42 % <tr><td>E<td>Normalizing constant E(v,m)
45function E=retrieval_nc(v,m,lambda,eta,gamma)
46E = sub_retrieval_nc(v(:).
',m(:).',lambda,eta,gamma,numel(lambda));
49function E=sub_retrieval_nc(v,m,lambda,eta,gamma,k)
52if sum(m)>k || min(m)<0
61% item k either out of the system or fetched at the IS station s=0
62E = (1+lambda(k)*eta(k,1))*sub_retrieval_nc(v,m,lambda,eta,gamma,k-1);
64% item k fetched at PS station s=1,...,r
68 E = E + lambda(k)*eta(k,s+1)*(v(s)+1)*sub_retrieval_nc(vp,m,lambda,eta,gamma,k-1);
71% item k stored in cache list j=1,...,h
74 E = E + gamma(k,j)*m(j)*sub_retrieval_nc(v,oner(m,j),lambda,eta,gamma,k-1);