LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
saveFCRMetrics.m
1function [simElem, simDoc] = saveFCRMetrics(self, simElem, simDoc)
2% [SIMELEM, SIMDOC] = SAVEFCRMETRICS(SIMELEM, SIMDOC)
3%
4% Saves performance metrics for Finite Capacity Regions (blocking regions).
5% Requests QLen, RespT, ResidT, and Tput metrics for each FCR.
6
7% Copyright (c) 2012-2026, Imperial College London
8% All rights reserved.
9
10if isempty(self.model.regions) || length(self.model.regions) == 0
11 return; % simElem, simDoc already assigned from inputs
12end
13
14% Metric types to request for FCRs
15% JMT uses these names for blocking region metrics. 'FCR Capacity' is the
16% weighted occupation (Total Weight); 'FCR Memory' is the memory occupation.
17metricTypes = {'Number of Customers', 'Response Time', 'Residence Time', 'Throughput', ...
18 'FCR Capacity', 'FCR Memory'};
19metricCounter = 0;
20
21for r = 1:length(self.model.regions)
22 fcrName = ['FCRegion', num2str(r)];
23
24 for m = 1:length(metricTypes)
25 metricType = metricTypes{m};
26 performanceNode = simDoc.createElement('measure');
27 performanceNode.setAttribute('alpha', num2str(1 - self.simConfInt, 2));
28 performanceNode.setAttribute('name', ['FCR_', fcrName, '_', strrep(metricType, ' ', ''), '_', num2str(metricCounter)]);
29 performanceNode.setAttribute('nodeType', 'region');
30 performanceNode.setAttribute('precision', num2str(self.simMaxRelErr, 2));
31 performanceNode.setAttribute('referenceNode', fcrName);
32 performanceNode.setAttribute('referenceUserClass', ''); % FCR metrics are not class-specific
33 performanceNode.setAttribute('type', metricType);
34 performanceNode.setAttribute('verbose', 'false');
35 simElem.appendChild(performanceNode);
36 metricCounter = metricCounter + 1;
37 end
38end
39end
Definition Station.m:245