1classdef (Sealed) ProcessType
2 % Enumeration of process ts
4 % Copyright (c) 2012-2026, Imperial College London
45 function t = fromId(
id)
55 function t = fromText(text)
56 % TIMMEDIATE = TOID(TYPE)
61 t = ProcessType.ERLANG;
63 t = ProcessType.HYPEREXP;
71 t = ProcessType.UNIFORM;
75 t = ProcessType.COXIAN;
77 t = ProcessType.GAMMA;
79 t = ProcessType.PARETO;
81 t = ProcessType.MMPP2;
82 case {
'Replayer',
'Trace'}
83 t = ProcessType.REPLAYER;
85 t = ProcessType.IMMEDIATE;
87 t = ProcessType.DISABLED;
91 t = ProcessType.WEIBULL;
93 t = ProcessType.LOGNORMAL;
94 case 'DiscreteUniform'
95 t = ProcessType.DUNIFORM;
97 t = ProcessType.BERNOULLI;
99 t = ProcessType.PRIOR;
101 t = ProcessType.BINOMIAL;
103 t = ProcessType.POISSON;
105 t = ProcessType.GEOMETRIC;
107 t = ProcessType.BMAP;
109 % A CME
is an ME:
the concentrated representation
is a
110 % subclass of ME and carries no distinct process type, so
111 % every solver gate and sn.procid entry that accepts ME
112 % accepts it. refreshProcessTypes passes
the class name, so
117 case 'DiscreteSampler'
118 t = ProcessType.DISCRETESAMPLER;
120 t = ProcessType.ZIPF;
122 t = ProcessType.DMAP;
124 t = ProcessType.NHPP;
126 % Class name, as passed by refreshProcessTypes. Without
this
127 %
case an EmpiricalCDF service aborts fromText during
128 % getStruct, before any solver feature gate can report that
129 %
the distribution
is unsupported.
130 t = ProcessType.EMPIRICALCDF;
131 case {
'MarkedMAP',
'MMAP',
'MarkedMMPP'}
132 t = ProcessType.MMAP;
134 line_error(mfilename, sprintf(
'Unrecognized process type: %s', text));
138 function text = toText(t)
139 % TEXT = TOTEXT(TYPE)
143 case ProcessType.ERLANG
145 case ProcessType.HYPEREXP
153 case ProcessType.UNIFORM
157 case ProcessType.COXIAN
159 case ProcessType.GAMMA
161 case ProcessType.PARETO
163 case ProcessType.MMPP2
165 case {ProcessType.REPLAYER, ProcessType.TRACE}
167 case ProcessType.IMMEDIATE
169 case ProcessType.DISABLED
171 case ProcessType.COX2
173 case ProcessType.WEIBULL
175 case ProcessType.LOGNORMAL
177 case ProcessType.DUNIFORM
178 text =
'DiscreteUniform';
179 case ProcessType.BERNOULLI
181 case ProcessType.PRIOR
183 case ProcessType.BINOMIAL
185 case ProcessType.POISSON
187 case ProcessType.GEOMETRIC
189 case ProcessType.BMAP
195 case ProcessType.DISCRETESAMPLER
196 text =
'DiscreteSampler';
197 case ProcessType.ZIPF
199 case ProcessType.DMAP
201 case ProcessType.NHPP
203 case ProcessType.MMAP
205 case ProcessType.EMPIRICALCDF
206 text =
'EmpiricalCDF';
211 text = sprintf(
'Unknown(%d)', t);