LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
refreshLST.m
1function [lst] = refreshLST(self,statSet,classSet)
2% [LT] = REFRESHLAPLST(STATSET,CLASSSET)
3% Refresh the Laplace-Stieltjes transforms in the NetworkStruct object
4
5% Copyright (c) 2012-2026, Imperial College London
6% All rights reserved.
7
8M = getNumberOfStations(self);
9K = getNumberOfClasses(self);
10if nargin<2
11 statSet = 1:M;
12 classSet = 1:K;
13 lst = cell(M,1);
14 for ist=1:M
15 lst{ist,1} = cell(1,K);
16 end
17elseif nargin==2
18 classSet = 1:K;
19 lst = cell(M,1);
20 for ist=1:M
21 lst{ist,1} = cell(1,K);
22 end
23elseif nargin==3 && isfield(self.sn,'lt')
24 % we are only updating selected stations and classes so use the
25 % existing ones for the others
26 lst = self.sn.lst;
27else
28 lst = cell(M,1);
29 for ist=1:M
30 lst{ist,1} = cell(1,K);
31 end
32end
33
34source_i = self.getIndexSourceStation;
35for ist=statSet
36 for r=classSet
37 if ist == source_i
38 if isa(self.stations{ist}.input.sourceClasses{r}{end},'Disabled')
39 lst{ist}{r} = [];
40 else
41 lst{ist}{r} = @(s) self.stations{ist}.arrivalProcess{r}.evalLST(s);
42 end
43 else
44 switch class(self.stations{ist})
45 case {'Fork'}
46 lst{ist}{r} = [];
47 case {'Join'}
48 lst{ist}{r} = [];
49 otherwise
50 lst{ist}{r} = @(s) self.stations{ist}.serviceProcess{r}.evalLST(s);
51 end
52 end
53 end
54end
55if ~isempty(self.sn) %&& isprop(self.sn,'mu')
56 self.sn.lst = lst;
57end
58end