1function [runtime, analyzer] = runAnalyzer(self, options)
2% RUNANALYZER Execute the bound-analysis solver.
4% Dispatches noniterative bound families to the shared bound handler
5% solver_ba_analyzer, and hierarchical/iterative families to their
6% SolverBA-native analyzers. Each method returns a single (upper or lower)
7% bound; use getBounds() to obtain the {lower,upper} bracket
for a family.
9% Copyright (c) 2012-2026, Imperial College London
13 options = self.getOptions;
19 line_error(mfilename,
'SolverBA supports closed queueing networks only.');
22%
'default' -> geometric upper bound;
'qr' -> QRF quadratic reduction;
'lr' ->
23% LP linear reduction (bare
'lr' means
'lr.upper'), distinct from
24%
'qrf.mmi.linear'. see _kb/06-solver-catalog.md
for rationale
25method = options.method;
26if strcmp(method,
'default')
28elseif strcmp(method,'lr')
30elseif strcmp(method,'qr')
34% Show library attribution (QRF uses the Optimization Toolbox) once.
35if options.verbose ~= VerboseLevel.SILENT && ~GlobalConstants.isLibraryAttributionShown()
36 libs = SolverBA.getLibrariesUsed([], setfield(options,'method',method)); %
#ok<SFLD>
38 line_printf(
'The solver will leverage %s.\n', strjoin(libs,
', '));
39 GlobalConstants.setLibraryAttributionShown(
true);
44if startsWith(method,
'qrf')
45 % QRF (Quadratic Reduction Framework) LP-based bounds
for single-
class
46 % closed networks with PH service. The adapter enforces its own gating.
47 analyzer = @(qn) solver_ba_qrf_analyzer(qn, setfield(options,
'method',method)); %#ok<SFLD>
48 bopts = options; bopts.method = method;
49 [QN,UN,RN,TN,CN,XN,runtime] = solver_ba_qrf_analyzer(sn, bopts);
50elseif any(strcmp(method, self.listValidMethods()))
51 analyzer = @(qn) solver_ba_analyzer(qn, setfield(options,'method',method)); %
#ok<SFLD>
52 bopts = options; bopts.method = method;
53 [QN,UN,RN,TN,CN,XN,lG,runtime,iter] = solver_ba_analyzer(sn, bopts);
55 line_error(mfilename, [
'Unknown bound method ''%s''. Valid methods: %s'], ...
56 method, strjoin(self.listValidMethods(),
', '));
61% Arrival rates from throughputs via sn_get_arvr_from_tput (not a zero matrix).
62% see _kb/06-solver-catalog.md
for rationale
63AN = sn_get_arvr_from_tput(sn, TN, self.getAvgTputHandles());
65self.setAvgResults(QN,UN,RN,TN,AN,WN,CN,XN,runtime,method,iter);