LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
solver_ctmc_joint.m
1function [Pnir,runtime,fname] = solver_ctmc_joint(sn, options)
2% [PNIR,RUNTIME,FNAME] = SOLVER_CTMC_JOINT(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,SS,~,~,~,~,sn] = solver_ctmc(sn, options);
13if options.keep
14 fname = lineTempName;
15 save([fname,'.mat'],'Q','SS')
16 line_printf('\nCTMC generator and state space saved in: ');
17 line_printf([fname, '.mat'])
18end
19pi = ctmc_solve_reducible(Q);
20pi(pi<GlobalConstants.Zero)=0;
21
22statevec = [];
23state = sn.state;
24for i=1:sn.nstations
25 if sn.isstateful(i)
26 isf = sn.nodeToStateful(i);
27 state_i = [zeros(1,size(sn.space{isf},2)-length(state{isf})),state{isf}];
28 statevec = [statevec, state_i];
29 end
30end
31Pnir = pi(findrows(SS, statevec));
32
33runtime = toc(Tstart);
34
35%if options.verbose
36% line_printf('CTMC analysis completed. Runtime: %f seconds.\n',runtime);
37%end
38end