LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
solver_nc_mem_supports.m
1function [supported, reason] = solver_nc_mem_supports(sn)
2% [SUPPORTED, REASON] = SOLVER_NC_MEM_SUPPORTS(SN)
3%
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.
15%
16% Copyright (c) 2012-2026, Imperial College London
17% All rights reserved.
18
19supported = false;
20reason = '';
21
22isopen = sn_is_open_model(sn);
23isclosed = sn_is_closed_model(sn);
24ismixed = ~isopen && ~isclosed;
25
26R = sn.nclasses;
27
28% Node types: open models are Source/Queue/Delay/Sink networks, closed
29% models are Queue/Delay networks
30for ind = 1:sn.nnodes
31 switch sn.nodetype(ind)
32 case {NodeType.Queue, NodeType.Delay}
33 % supported
34 case {NodeType.Source, NodeType.Sink}
35 if isclosed
36 reason = 'MEM supports only Queue and Delay nodes in closed models.';
37 return
38 end
39 otherwise
40 reason = 'MEM supports only Source, Queue, Delay and Sink nodes.';
41 return
42 end
43end
44
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.';
48 return
49end
50
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);
55 for r = 1:R
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).';
58 return
59 end
60 end
61end
62
63% Only non-priority disciplines are supported; the PR/HOL constraint
64% formulae are not given in Kouvatsos (1994)
65for ist = 1:sn.nstations
66 switch sn.sched(ist)
67 case {SchedStrategy.EXT, SchedStrategy.INF, SchedStrategy.FCFS, ...
68 SchedStrategy.PS, SchedStrategy.SIRO, SchedStrategy.LCFS, ...
69 SchedStrategy.LCFSPR}
70 % supported
71 otherwise
72 reason = sprintf('MEM does not support the %s scheduling strategy.', SchedStrategy.toText(sn.sched(ist)));
73 return
74 end
75end
76
77if isopen || ismixed
78 % A Source node must be present for the external arrival extraction
79 hasSource = false;
80 for ind = 1:sn.nnodes
81 if sn.nodetype(ind) == NodeType.Source
82 hasSource = true;
83 break;
84 end
85 end
86 if ~hasSource
87 reason = 'MEM requires a Source node when open classes are present.';
88 return
89 end
90end
91if isclosed || ismixed
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.';
96 return
97 end
98 end
99end
100
101supported = true;
102end
Definition fjtag.m:157
Definition Station.m:245