LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
SolverNC.m
1classdef SolverNC < NetworkSolver
2 % SolverNC Normalizing Constant solver for product-form networks
3 %
4 % SolverNC implements normalizing constant algorithms for analyzing closed
5 % product-form queueing networks. It computes the normalizing constant and
6 % associated performance measures efficiently without explicitly enumerating
7 % all network states, making it suitable for medium to large closed networks.
8 %
9 % @brief Normalizing constant solver for efficient closed network analysis
10 %
11 % Key characteristics:
12 % - Normalizing constant computation for product-form networks
13 % - Avoids explicit state enumeration
14 % - Efficient algorithms for closed networks
15 % - Multiple computational methods (exact, approximation)
16 % - State probability computation via normalization
17 %
18 % NC solver methods:
19 % - Exact normalizing constant computation
20 % - IMCI (Improved Modular Computer Implementation)
21 % - Linearizer methods (LS, LE)
22 % - Interpolation methods (MMINT2, GLEINT)
23 % - Approximation methods (CA, Panacea)
24 %
25 % SolverNC is ideal for:
26 % - Closed product-form networks
27 % - Medium to large population networks
28 % - Systems requiring efficient exact solutions
29 % - Networks with complex routing patterns
30 % - Performance analysis requiring state probabilities
31 %
32 % Example:
33 % @code
34 % solver = SolverNC(model, 'method', 'exact');
35 % solver.getProbAggr(); % State probabilities
36 % solver.getNormalizingConstant(); % Normalizing constant
37 % @endcode
38 %
39 % Copyright (c) 2012-2026, Imperial College London
40 % All rights reserved.
41
42 methods
43 function self = SolverNC(model,varargin)
44 % SOLVERNC Create a Normalizing Constant solver instance
45 %
46 % @brief Creates an NC solver for product-form network analysis
47 % @param model Network model to be analyzed via normalizing constant methods
48 % @param varargin Optional parameters (method, tolerance, etc.)
49 % @return self SolverNC instance configured for NC analysis
50
51 self@NetworkSolver(model, mfilename);
52 self.setOptions(Solver.parseOptions(varargin, self.defaultOptions));
53 self.setLang();
54 end
55
56 runtime = runAnalyzer(self, options)
57 Pnir = getProb(self, node, state)
58 Pnir = getProbAggr(self, node, state_a)
59 Pn = getProbSys(self)
60 Pn = getProbSysAggr(self)
61 RD = getCdfRespT(self, R);
62
63 function [normConst,lNormConst] = getNormalizingConstant(self)
64 normConst = exp(getProbNormConstAggr(self));
65 lNormConst = getProbNormConstAggr(self);
66 end
67
68 [lNormConst] = getProbNormConstAggr(self)
69
70 function sn = getStruct(self)
71 % QN = GETSTRUCT()
72
73 % Get data structure summarizing the model
74 sn = self.model.getStruct(false); %no need for initial state
75 end
76
77 function [allMethods] = listValidMethods(self)
78 % allMethods = LISTVALIDMETHODS()
79 % List valid methods for this solver
80 sn = self.model.getStruct();
81 allMethods = {'default','exact','imci','ls',...
82 'le','mmint2','gleint','panacea','ca',...
83 'kt','sampling',...
84 'propfair','comom','cub',...
85 'rd', 'nrp','nrl','gm','mem'};
86 end
87 end
88
89 methods (Static)
90
91 function featSupported = getFeatureSet()
92 % FEATSUPPORTED = GETFEATURESET()
93
94 featSupported = SolverFeatureSet;
95 featSupported.setTrue({'Sink','Source',...
96 'ClassSwitch','Delay','DelayStation','Queue',...
97 'APH','Coxian','Erlang','Det','Exp','HyperExp',...
98 'StatelessClassSwitcher','InfiniteServer',...
99 'SharedServer','Buffer','Dispatcher',...
100 'Server','JobSink','RandomSource','ServiceTunnel',...
101 'SchedStrategy_INF','SchedStrategy_PS','SchedStrategy_SIRO',...
102 'SchedStrategy_LCFS','SchedStrategy_LCFSPR',...
103 'RoutingStrategy_PROB','RoutingStrategy_RAND',...
104 'SchedStrategy_FCFS','ClosedClass','SelfLoopingClass',...
105 'Cache','CacheClassSwitcher','OpenClass', ...
106 'ReplacementStrategy_RR', 'ReplacementStrategy_FIFO'});
107 %'OpenClass',...
108 end
109
110 function [bool, featSupported] = supports(model)
111 % [BOOL, FEATSUPPORTED] = SUPPORTS(MODEL)
112
113 featUsed = model.getUsedLangFeatures();
114 featSupported = SolverNC.getFeatureSet();
115 bool = SolverFeatureSet.supports(featSupported, featUsed);
116 end
117
118 function options = defaultOptions()
119 % OPTIONS = DEFAULTOPTIONS()
120 options = SolverOptions('NC');
121 end
122
123 function libs = getLibrariesUsed(sn, options)
124 % GETLIBRARIESUSED Get list of external libraries used by NC solver
125 % NC uses internal normalizing constant algorithms, no external libraries needed
126 libs = {};
127 end
128 end
129end