1function [chainModel, alpha, deaggInfo] = aggregateChains(self, suffix)
2% [CHAINMODEL, ALPHA, DEAGGINFO] = AGGREGATECHAINS(SELF)
3% [CHAINMODEL, ALPHA, DEAGGINFO] = AGGREGATECHAINS(SELF, SUFFIX)
5% Return a copy of
this model in which all classes belonging to the same
6% chain are merged into a single aggregate
class, so that the aggregated
7% model has one
class per chain of the original. Class switching
is
8% eliminated in the process. SUFFIX
is appended to the names of the
9% aggregate classes (
default:
'').
11% ALPHA
is the (nstations x nclasses) matrix of aggregation factors and
12% DEAGGINFO carries everything needed to
map chain-level metrics back to
13% class-level metrics with sn_deaggregate_chain_results:
15% [Q,U,R,T,C,X] = sn_deaggregate_chain_results(self.getStruct(), ...
16% deaggInfo.Lchain, [], deaggInfo.STchain, deaggInfo.Vchain, ...
17% deaggInfo.alpha, Qchain, Uchain, Rchain, Tchain, [], Xchain);
19% The aggregation
is exact
for product-
form models and approximate
20% otherwise, since a single aggregate service process replaces the
21% per-
class ones weighted by ALPHA.
23% Copyright (c) 2012-2026, Imperial College London
29[chainModel, alpha, deaggInfo] = ModelAdapter.aggregateChains(self, suffix);