LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getSymbolicGenerator.m
1function [infGen, eventFilt, syncInfo, stateSpace, nodeStateSpace] = getSymbolicGenerator(self,invertSymbol)
2if nargin<2
3 invertSymbol = false;
4end
5if ~exist('sym')
6 line_error(mfilename,'This method requires MATLAB''s Symbolic Toolbox.');
7end
8if ~isdeployed
9 [~, F] = getGenerator(self);
10 [ stateSpace, nodeStateSpace] = getStateSpace(self);
11 infGen = sym(zeros(size(F{1})));
12 eventFilt = cell(1, length(F));
13 for e = 1:length(F)
14 F{e} = full(F{e});
15 minF = min(min(F{e}(F{e}>0)));
16 if ~isempty(minF)
17 F{e} = F{e} / minF;
18 if invertSymbol
19 eventFilt{e} = F{e} / sym(['x',num2str(e)],'real');
20 else
21 eventFilt{e} = F{e} * sym(['x',num2str(e)],'real');
22 end
23 infGen = infGen + eventFilt{e};
24 end
25 end
26 infGen = ctmc_makeinfgen(infGen);
27 syncInfo = self.getStruct.sync;
28else
29 infGen = [];
30 eventFilt = [];
31 syncInfo = [];
32end
33end