LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
nc_is_oi_model.m
1function isoi = nc_is_oi_model(sn)
2% ISOI = NC_IS_OI_NC_MODEL(SN)
3%
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.
10%
11% Copyright (c) 2012-2026, Imperial College London
12% All rights reserved.
13isoi = false;
14if any(isinf(sn.njobs))
15 return
16end
17hasOI = false;
18for ist = 1:sn.nstations
19 if sn.sched(ist) == SchedStrategy.INF
20 continue
21 elseif sn.sched(ist) == SchedStrategy.PAS || sn.sched(ist) == SchedStrategy.OI
22 ind = sn.stationToNode(ist);
23 if ind < 1 || ind > numel(sn.nodeparam) || ~isstruct(sn.nodeparam{ind}) ...
24 || ~isfield(sn.nodeparam{ind}, 'swapGraph')
25 return
26 end
27 sg = sn.nodeparam{ind}.swapGraph;
28 if isempty(sg) || any(sg(:) ~= 0)
29 return % genuine pass-and-swap: not order-independent
30 end
31 hasOI = true;
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
39 end
40 end
41 else
42 return % an unsupported (non-product-form) station
43 end
44end
45isoi = hasOI;
46end
Definition Station.m:245