1function [supported, reason] = solver_nc_mem_supports(sn)
2% [SUPPORTED, REASON] = SOLVER_NC_MEM_SUPPORTS(SN)
4% Checks whether
the Maximum Entropy Method (Kouvatsos 1994) supports
the
5% model described by
the network structure SN. Returns SUPPORTED=
true and
6% an empty REASON when
the model
is a plain open queueing network
7% (Section 3.2: Source, Queue, Delay and Sink
nodes; GE/GE/1, GE/GE/c and
8% GE/GE/inf building blocks), a plain closed queueing network
9% (Section 3.3: Queue and Delay
nodes; G/G/1 and G/G/inf building blocks
10% only, so finite multiserver stations are rejected), or a mixed
11% open/closed network (composition of
the two algorithms; single-server
12% and IS stations only), in all cases without
class switching and with
13% non-priority scheduling disciplines only; otherwise SUPPORTED=
false and
14% REASON explains
the first unsupported feature found.
16% Copyright (c) 2012-2026, Imperial College London
22isopen = sn_is_open_model(sn);
23isclosed = sn_is_closed_model(sn);
24ismixed = ~isopen && ~isclosed;
28% Node types: open models are Source/Queue/Delay/Sink networks, closed
29% models are Queue/Delay networks
31 switch sn.nodetype(ind)
32 case {NodeType.Queue, NodeType.Delay}
34 case {NodeType.Source, NodeType.Sink}
36 reason =
'MEM supports only Queue and Delay nodes in closed models.';
40 reason =
'MEM supports only Source, Queue, Delay and Sink nodes.';
45% Class switching
is not part of
the Kouvatsos (1994) network model
46if any(any(sn.csmask & ~eye(R)))
47 reason = 'MEM does not support class switching.';
51% Absorbing self-loops (p_ii=1) make
the routing reducible and
the
52% geometric feedback transform 1/(1-p_ii) degenerate
53for ist = 1:sn.nstations
54 ind = sn.stationToNode(ist);
56 if sn.rtnodes((ind-1)*R + r, (ind-1)*R + r) >= 1 - 1e-9
57 reason = 'MEM does not support absorbing self-loop routing (reducible network).';
63% Only non-priority disciplines are supported;
the PR/HOL constraint
64% formulae are not given in Kouvatsos (1994)
65for ist = 1:sn.nstations
67 case {SchedStrategy.EXT, SchedStrategy.INF, SchedStrategy.FCFS, ...
68 SchedStrategy.PS, SchedStrategy.SIRO, SchedStrategy.LCFS, ...
72 reason = sprintf(
'MEM does not support the %s scheduling strategy.', SchedStrategy.toText(sn.sched(ist)));
78 % A Source node must be present
for the external arrival extraction
81 if sn.nodetype(ind) == NodeType.Source
87 reason =
'MEM requires a Source node when open classes are present.';
92 % Closed classes build on G/G/1 and G/G/inf queues only (Section 3.3)
93 for ist = 1:sn.nstations
94 if isfinite(sn.nservers(ist)) && sn.nservers(ist) > 1
95 reason =
'MEM does not support multiserver stations in closed or mixed models.';