1function [XN,UN,QN,RN,TN,CN,tranSysState,tranSync,sn] = solver_ssa_nrm_space_analyzer(sn, options)
2% SOLVER_SSA_ANALYZER_NRM Performance indices from SSA/NRM simulation
3% This variant runs the next‑reaction–method SSA on the network SN and
4% returns mean throughput (XN), utilisation (UN), queue length (QN),
5% response time (RN), throughput per station (TN) and
class residence
6% time (CN). Results are based on the empirical state probabilities
7% obtained from SOLVER_SSA_NRM.
8% *** Only stations whose scheduling policy
is INF, EXT or PS are
9% supported. Any other policy triggers an error. Cache
nodes are not
10% supported in
this simplified variant. ***
12% Validate scheduling policies ---------------------------------------------------
13allowedSched = [SchedStrategy.INF, SchedStrategy.EXT, SchedStrategy.PS];
14if any(~arrayfun(@(s) any(s == allowedSched), sn.sched))
15 error('solver_ssa_analyzer_nrm:UnsupportedPolicy', ...
16 'Only SchedStrategy.INF, SchedStrategy.EXT and SchedStrategy.PS are supported.');
19line_debug('SSA NRM space analyzer starting: nstations=%d, nclasses=%d', sn.nstations, sn.nclasses);