1function result = getMAMResult(self)
2% RESULT = GETMAMRESULT()
4% Intermediate quantities of the matrix-analytic analysis of a single-queue
5% model, in addition to the mean performance measures returned by getAvg.
7% Mean values alone hide the objects the method
is actually built on, so a
8% matrix-analytic result cannot be inspected, taught, or checked against a
9% published derivation. This accessor returns them.
11% For a BMAP (or MAP) arrival stream feeding an exponential single server the
12% result
is that of qsys_bmapm1 and carries the M/G/1-type quantities: the
13% phase-process stationary vectors theta and alpha, the randomized blocks A0,
14% A1, B0 and Bk, the matrix G, the drift, the measured decay rate and the level
17% For a retrial station the result
is that of qsys_bmapphnn_retrial and carries
18% the orbit-level stationary distribution together with the truncation level and
21% See also qsys_bmapm1, qsys_bmapphnn_retrial, SolverMAM.getAvg
23% Copyright (c) 2012-2026, Imperial College London
26sn = self.model.getStruct();
28% A retrial station carries its own engine, whose result
object already exposes
29% the orbit-level internals.
30[isRetrial, retInfo] = qsys_is_retrial(sn);
32 options = self.getOptions();
33 options.verbose =
false;
34 [~,~,~,~,~,~,~,result] = solver_mam_retrial(sn, options);
38% Otherwise: BMAP/MAP arrivals into a single exponential server.
41for ist = 1:sn.nstations
42 nodeIdx = sn.stationToNode(ist);
43 if sn.nodetype(nodeIdx) == NodeType.Source
45 elseif sn.nodetype(nodeIdx) == NodeType.Queue
49 line_error(mfilename,
'getMAMResult exposes the matrix-analytic internals of a single-queue model only.');
53if isempty(sourceIdx) || isempty(queueIdx)
54 line_error(mfilename,
'getMAMResult requires an open model with one Source and one Queue.');
57 line_error(mfilename,
'getMAMResult exposes the matrix-analytic internals of a single-class model only.');
59if sn.nservers(queueIdx) ~= 1
60 line_error(mfilename,
'getMAMResult requires a single-server queue.');
63arrivalProc = sn.proc{sourceIdx}{1};
64if isempty(arrivalProc) || ~iscell(arrivalProc) || numel(arrivalProc) < 2
65 line_error(mfilename,
'The arrival process has no Markovian (D0,D1,...) representation.');
68serviceProc = sn.proc{queueIdx}{1};
69if isempty(serviceProc) || ~iscell(serviceProc) || size(serviceProc{1},1) ~= 1
70 line_error(mfilename, [
'getMAMResult exposes the M/G/1-type internals for exponential service only; ' ...
71 'the queue has a multi-phase service process.']);
73mu = -serviceProc{1}(1,1);
75result = qsys_bmapm1(arrivalProc, mu);