2% M=map_max(A,B) - MAP of
the maximum of two independent MAPs
5% A: a MAP in
the form of {D0,D1}
6% B: a MAP in
the form of {D0,D1}
9% M: a MAP in
the form of {D0,D1} whose inter-arrival times are
10% distributed as max(X,Y), with X~A and Y~B drawn independently at each
11% arrival epoch from
the respective embedded equilibrium distributions
13% The phase space
is ordered as [(i,j) pairs, B-only phases, A-only
14% phases]: in
the first block both A and B are still running, in
the
15% second block A has already completed and B
is awaited, in
the third
16% block B has completed and A
is awaited. An arrival
is recorded when
the
17% second of
the two completes, i.e. only out of
the last two blocks.
23% pair state (i,j) has index (i-1)*nb+j, matching krons(A{1},B{1})
25 krons(A{1},B{1}), kron(a,eye(nb)), kron(eye(na),b)
26 zeros(nb,na*nb), B{1}, zeros(nb,na)
27 zeros(na,na*nb), zeros(na,nb), A{1}
29pie = [kron(map_pie(A),map_pie(B)),zeros(1,nb),zeros(1,na)];
30% completion rate of
the second of
the two processes out of each phase; it
31%
is zero in
the pair block, where only
the first one can still complete
32d = [zeros(na*nb,1); b; a];