LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
map_count_var.m
1function v = map_count_var(map,t)
2% Computes the variance of the counting process, at resolution t, for the
3% given MAP.
4% Input:
5% - map: Markovian Arrival Process (symbolic or numeric)
6% - t: the period considered for each sample of the counting process
7% Output:
8% - v: variance of arrivals in (0,t]
9% Reference: [He and Neuts, Markov chains with marked transitions, 1998]
10% Verified special case of MMPP(2) with [Andresen and Nielsen, 1998].
11
12n = size(map{1},1);
13
14D = map{1} + map{2};
15if map_issym(map)
16 I = sym(eye(n));
17 e = sym(ones(n,1));
18 v = sym(zeros(length(t),1));
19else
20 I = eye(n);
21 e = ones(n,1);
22 v = zeros(length(t),1);
23end
24theta = map_prob(map);
25tmp = (e * theta - D)^(-1);
26
27% arrival rate
28l = theta * map{2} * e;
29c = theta * map{2} * tmp;
30d = tmp * map{2} * e;
31ll = theta * map{2} * e;
32for i=1:length(t)
33 v(i) = (ll-2*l^2 + 2*c*map{2}*e)*t(i) - 2*c*(I-expm(D*t(i)))*d;
34end
35
36end