3 % @file pfqn_comomrm_ld.m
4 % @brief CoMoM
for repairman model with load-dependent service rates.
10 % @brief CoMoM
for repairman model with load-dependent service rates.
11 % @fn pfqn_comomrm_ld(L, N, Z, mu, options)
12 % @param L Service demand matrix.
13 % @param N Population vector.
14 % @param Z Think time vector.
15 % @param mu Load-dependent rate matrix (MxNt matrix).
16 % @param options Solver options.
17 % @
return G Normalizing constant.
18 % @
return lG Logarithm of normalizing constant.
19 % @
return prob State probability distribution.
22function [G,lG,prob] = pfqn_comomrm_ld(L,N,Z,mu, options)
23% S: number of servers at the queueing stations
29if sum(Z) < GlobalConstants.Zero
32 if norm(mu(ist,:)-(1:Nt),2) < atol
41if sum(L) < GlobalConstants.Zero
42 % model has only delays so it
is trivial
43 [G,lG] = pfqn_ca(L,N,Z);
44 prob = zeros(sum(N)+1,1);
51[~,L,N,Z,lG0] = pfqn_nc_sanitize(zeros(1,R),L,N,Z,atol);
57 prob = zeros(Nt+1,1); prob(1)=1;
67 prob = zeros(sum(N)+1,1);
73 line_error(mfilename,
'The solver accepts at most a single queueing station.')
76h = sparse(zeros(Nt+1,1)); h(Nt+1,1)=1;
80 Tr = Z(r)*speye(Nt+1) + diag(sparse(L(r)*(Nt:-1:1)./mu(Nt:-1:1)),1);
84 scale(nt) = abs(sum(sort(h))); % sort minimizes numerical issues
85 h = abs(h)/scale(nt); % rescale so that |h|=1
89lG = lG0 + sum(log(scale));