LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
runAnalyzer.m
1function [runtime, analyzer] = runAnalyzer(self, options)
2% RUNTIME = RUN()
3% Run the solver
4
5T0=tic;
6if nargin<2
7 options = self.getOptions;
8end
9
10QN = []; UN = [];
11RN = []; TN = [];
12CN = []; XN = [];
13lG = NaN;
14
15if self.enableChecks && ~self.supports(self.model)
16 ME = MException('Line:FeatureNotSupportedBySolver', 'This model contains features not supported by the solver.');
17 throw(ME);
18end
19
20Solver.resetRandomGeneratorSeed(options.seed);
21
22sn = getStruct(self); % doesn't need initial state
23
24if (strcmp(options.method,'exact')||strcmp(options.method,'mva')) && ~self.model.hasProductFormSolution
25 line_error(mfilename,'The exact method requires the model to have a product-form solution. This model does not have one. You can use Network.hasProductFormSolution() to check before running the solver.');
26end
27
28method = options.method;
29
30[QN,UN,RN,TN,CN,XN,runtime] = solver_custom_analyzer(sn, options);
31
32if nargout > 1
33 analyzer = @(sn) solver_customer_anlyzer(sn, options);
34end
35
36self.setAvgResults(QN,UN,RN,TN,[],[],CN,XN,runtime,method);
37
38runtime = toc(T0);
39end