LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
sn_fj_foldback.m
1function [QN,UN,RN,TN,CN,XN] = sn_fj_foldback(QN,UN,RN,TN,CN,XN,fjclassmap,Korig)
2% [QN,UN,RN,TN,CN,XN] = SN_FJ_FOLDBACK(QN,UN,RN,TN,CN,XN,FJCLASSMAP,KORIG)
3%
4% Fold the auxiliary-class columns of the average metrics computed on an
5% FJ tag-augmented struct (ModelAdapter.fjtag) back into the original
6% classes: queue lengths, utilizations and throughputs of the sibling
7% classes are exact aggregates of the original class they were forked
8% from; response times are recomputed by Little's law after folding.
9%
10% QN,UN,RN,TN are (nstations x Kaug); CN,XN are (1 x Kaug); the outputs
11% retain only the first Korig columns.
12
13% Copyright (c) 2012-2026, Imperial College London
14% All rights reserved.
15
16Kaug = length(fjclassmap);
17for a=1:Kaug
18 r = fjclassmap(a);
19 if r > 0
20 QN(:,r) = QN(:,r) + QN(:,a);
21 UN(:,r) = UN(:,r) + UN(:,a);
22 TN(:,r) = TN(:,r) + TN(:,a);
23 end
24end
25QN = QN(:,1:Korig);
26UN = UN(:,1:Korig);
27TN = TN(:,1:Korig);
28RN = zeros(size(QN));
29for r=1:Korig
30 for ist=1:size(QN,1)
31 if TN(ist,r) > 0
32 RN(ist,r) = QN(ist,r) / TN(ist,r);
33 end
34 end
35end
36% system metrics are measured on the original class columns only
37CN = CN(:,1:Korig);
38XN = XN(:,1:Korig);
39
40end
Definition Station.m:245