1function isoi = nc_is_oi_model(sn)
2% ISOI = NC_IS_OI_NC_MODEL(SN)
4% True when
the model
is a closed queueing network that contains at least one
5% order-independent (OI) station (SchedStrategy.OI, or PAS with an empty swap
6% graph) and every other station
is a BCMP product-form station: infinite
7% server (delay), PS, LCFS-PR, SIRO, or
class-independent-rate FCFS. Such
8% models are solved exactly by SOLVER_NC_OI_NC_ANALYZER. The OI requirement
9% keeps pure-BCMP networks on
the standard (faster) normalizing-constant path.
11% Copyright (c) 2012-2026, Imperial College London
14if any(isinf(sn.njobs))
18for ist = 1:sn.nstations
19 if sn.sched(ist) == SchedStrategy.INF
21 elseif sn.sched(ist) == SchedStrategy.PAS || sn.sched(ist) == SchedStrategy.OI
22 ind = sn.stationToNode(ist);
24 || ~isfield(sn.nodeparam{ind},
'swapGraph')
27 sg = sn.nodeparam{ind}.swapGraph;
28 if isempty(sg) || any(sg(:) ~= 0)
29 return % genuine pass-and-swap: not order-independent
32 elseif any(sn.sched(ist) == [SchedStrategy.PS, SchedStrategy.LCFSPR, SchedStrategy.SIRO, SchedStrategy.FCFS])
33 if any(sn.sched(ist) == [SchedStrategy.FCFS, SchedStrategy.SIRO])
34 % Product form requires a class-independent FCFS/SIRO rate.
35 rr = sn.rates(ist, :);
36 rr = rr(isfinite(rr) & sn.njobs > 0);
37 if ~isempty(rr) && (max(rr) - min(rr)) > 1e-9 * max(rr)
38 return % class-dependent FCFS/SIRO: not product form
42 return % an unsupported (non-product-form) station