3 % @file pfqn_comomrm_ms.m
4 % @brief CoMoM
for multiserver repairman model.
10 % @brief CoMoM
for multiserver repairman model.
11 % @fn pfqn_comomrm_ms(L, N, Z, m, S)
12 % @param L Service demand matrix.
13 % @param N Population vector.
14 % @param Z Think time vector.
15 % @param m Replication
factor (
default: 1).
16 % @param S Number of servers at queueing stations.
17 % @return G Normalizing constant.
18 % @return lG Logarithm of normalizing constant.
19 % @return prob State probability distribution.
22function [G,lG,prob] = pfqn_comomrm_ms(L,N,Z,m,S)
24% S: number of servers at the queueing stations
27 line_error(mfilename,
'The solver accepts at most a single queueing station.')
33 S=1; % single server per queueing station, as the docstring advertises
35atol = GlobalConstants.FineTol;
36[~,L,N,Z,lG0] = pfqn_nc_sanitize(zeros(1,R),L,N,Z,atol);
37% R must be re-read here: sanitize DROPS zero-population and zero-demand
38% classes, so the pre-sanitize R above overruns the shortened L, N and Z in
39% the loop below. Reachable on ordinary input, since a zero-population class
40%
is a normal thing to hand a solver.
44 mu = pfqn_mu_ms(Nt,m,S);
49h = zeros(Nt+1,1); h(Nt+1,1)=1;
53 Tr = Z(r)*eye(Nt+1) + diag(L(r)*(Nt:-1:1)./mu(Nt:-1:1),1);
57 scale(nt) = abs(sum(sort(h)));
58 h = abs(h)/scale(nt); % rescale so that |h|=1
62lG = lG0 + sum(log(scale));