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)
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.
10% QN,UN,RN,TN are (nstations x Kaug); CN,XN are (1 x Kaug); the outputs
11% retain only the first Korig columns.
13% Copyright (c) 2012-2026, Imperial College London
16Kaug = length(fjclassmap);
20 QN(:,r) = QN(:,r) + QN(:,a);
21 UN(:,r) = UN(:,r) + UN(:,a);
22 TN(:,r) = TN(:,r) + TN(:,a);
32 RN(ist,r) = QN(ist,r) / TN(ist,r);
36% system metrics are measured on the original class columns only