LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
solver_ctmc_jointaggr.m
1function [Pnir,runtime,fname] = solver_ctmc_jointaggr(sn, options)
2% [PNIR,RUNTIME,FNAME] = SOLVER_CTMC_JOINTAGGR(QN, OPTIONS)
3%
4% Copyright (c) 2012-2026, Imperial College London
5% All rights reserved.
6
7M = sn.nstations; %number of stations
8K = sn.nclasses; %number of classes
9fname = '';
10Tstart = tic;
11
12[Q,~,SSq,~,~,~,sn] = solver_ctmc(sn, options);
13% SSq is an aggregate state space
14if options.keep
15 fname = lineTempName;
16 save([fname,'.mat'],'Q','SSq')
17 line_printf('\nCTMC generator and aggregate state space saved in: ');
18 line_printf([fname, '.mat'])
19end
20pi = ctmc_solve_reducible(Q);
21pi(pi<GlobalConstants.Zero)=0;
22
23state = sn.state;
24nvec = [];
25for i=1:sn.nstations
26 if sn.isstateful(i)
27 isf = sn.stationToStateful(i);
28 [~,nir,~,~] = State.toMarginal(sn, isf, state{isf});
29 nvec = [nvec, nir(:)'];
30 end
31end
32Pnir = sum(pi(findrows(SSq,nvec)));
33
34runtime = toc(Tstart);
35
36%if options.verbose
37% line_printf('\nCTMC analysis completed. Runtime: %f seconds.\n',runtime);
38%end
39end