LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
solver_mvald_analyzer.m
1function [Q,U,R,T,C,X,lG,runtime,iter,method] = solver_mvald_analyzer(sn, options)
2% [Q,U,R,T,C,X,RUNTIME,ITER] = SOLVER_MVALD_ANALYZER(SN, OPTIONS)
3
4% Copyright (c) 2012-2026, Imperial College London
5% All rights reserved.
6
7Tstart = tic;
8method = options.method;
9
10line_debug('MVA load-dependent analyzer starting: method=%s, nclasses=%d, njobs=%s', method, sn.nclasses, mat2str(sn.njobs));
11
12switch options.method
13 case {'exact','mva'}
14 if ~isempty(sn.cdscaling)
15 line_error(mfilename,'Exact class-dependent solver not available in MVA.');
16 end
17 line_debug('Using exact load-dependent MVA, calling solver_mvald');
18 [Q,U,R,T,C,X,lG,iter] = solver_mvald(sn, options);
19 case {'default','amva','qd', 'lin', 'qdlin'} %,'aql','qdaql'
20 if strcmpi(options.method, 'default') && isempty(sn.cdscaling) ...
21 && all(isfinite(sn.njobs)) && sn.nchains <= 4 && sum(sn.njobs) <= 20 ...
22 && sn_has_product_form(sn) && ~sn_has_fractional_populations(sn)
23 % Small closed product-form LD model: use the exact load-dependent
24 % MVA recursion, mirroring the default-to-exact upgrade applied to
25 % non-LD models in solver_mva_analyzer.
26 line_debug('Default method: using exact load-dependent MVA\n');
27 [Q,U,R,T,C,X,lG,iter] = solver_mvald(sn, options);
28 method = 'exact';
29 else
30 if strcmpi(options.method, 'default')
31 line_debug('Default method: using approximate MVA\n');
32 end
33 line_debug('Using approximate MVA method: %s, calling solver_amva', options.method);
34 [Q,U,R,T,C,X,lG,iter,method] = solver_amva(sn, options);
35 end
36 otherwise
37 line_error(mfilename,sprintf('The %s method is not supported by the load-dependent MVA solver.',options.method));
38end
39
40runtime = toc(Tstart);
41
42if options.verbose
43 % line_printf('\nMVA load-dependent analysis completed. Runtime: %f seconds.\n',runtime);
44end
45return
46end
Definition Station.m:245