1%% getTranHandles: add all transient mean performance indexes
2% Q{i,r}: timeseries of mean queue-length of
class r at node i
3% U{i,r}: timeseries of mean utilization of
class r at node i
4% R{i,r}: timeseries of mean response time of
class r at node i (summed across
visits)
5% T{i,r}: timeseries of mean throughput of
class r at node i
6function [Qt,Ut,Tt] = getTranHandles(self)
7% [QT,UT,TT] = GETTRANHANDLES()
9% Copyright (c) 2012-2026, Imperial College London
12% The method returns the handles to the performance indices but
13% they are optional to collect
14M = getNumberOfStations(self);
15K = getNumberOfClasses(self);
17Tt = cell(1,K); % throughputs
18Qt = cell(M,K); % queue-length
19%Rt = cell(M,K); % response times
20Ut = cell(M,1); % utilizations
23 Tt{ist,r} = Metric(MetricType.TranTput, self.classes{r}, self.stations{ist});
24 Qt{ist,r} = Metric(MetricType.TranQLen, self.classes{r}, self.stations{ist});
25 % Rt{i,r} = Metric(MetricType.TranRespT, self.classes{r}, self.stations{i});
26 Ut{ist,r} = Metric(MetricType.TranUtil, self.classes{r}, self.stations{ist});
27 if isa(self.stations{ist},
'Source')
28 Qt{ist,r}.disabled =
true;
29 % Rt{i,r}.disabled =
true;
30 Ut{ist,r}.disabled =
true;
32 if isa(self.stations{ist},
'Sink')
33 Qt{ist,r}.disabled =
true;
34 % Rt{i,r}.disabled =
true;
35 Ut{ist,r}.disabled =
true;
37 if isa(self.stations{ist},
'Join') || isa(self.stations{ist},
'Fork')
38 Ut{ist,r}.disabled =
true;
40 if ~strcmpi(
class(self.stations{ist}.server),
'ServiceTunnel')
41 if isempty(self.stations{ist}.server.serviceProcess{r}) || strcmpi(
class(self.stations{ist}.server.serviceProcess{r}{end}),
'Disabled')
42 Tt{ist,r}.disabled =
true;
43 Qt{ist,r}.disabled =
true;
44 % Rt{i,r}.disabled =
true;
45 Ut{ist,r}.disabled =
true;