1% @brief MATLAB Coder script to generate MEX functions
for infer_
module.
3% This script generates MEX (MATLAB Executable) versions of demand-
4% inference functions for improved performance.
6% Skipped functions (Coder-incompatible):
7% infer_get_qlen_arrival - Cell-array `data` argument with ragged
9% infer_gibbs - Cell-array `data` argument and use of
10% exist() for default-arg detection.
11% infer_rps - Calls lsqnonneg() (Optimization
12% Toolbox), not supported by Coder.
13% infer_mlps, infer_minps,
14% infer_minps_setup, infer_fmlps - Take a Network model OOP object and
15% call its method getNumberOfServers().
17% infer_quick_model_rnn - Construct Network/Source/Queue/JobClass
19% infer_fluid_ps_rt_likelihood - Returns a function handle (ode_h) and
20% consumes the sn struct.
21% sn_set_service_coc - Uses ProcessType enum, cell-of-cells
22% fields of the sn struct.
24% See also CODER, CODER.CONFIG, CODER.TYPEOF, CODEGEN.
26%% Create configuration object of class 'coder.CodeConfig'.
27cfg = coder.config('mex','ecoder',false);
28cfg.GenerateReport =
false;
29cfg.ReportPotentialDifferences =
false;
30cfg.GenCodeOnly =
false;
33scal_type = coder.typeof(0);
34vec_type = coder.typeof(0,[1 Inf],[0 1]);
35col_vec_type = coder.typeof(0,[Inf 1],[1 0]);
36mat_type = coder.typeof(0,[Inf Inf],[1 1]);
38%% ===== Group: Closed-form demand estimators =====
40% infer_qmle(Q, N, Z) -> D
41codegen -config cfg infer_qmle -args {mat_type, vec_type, vec_type}
43%% ===== Group: Queue-length reconstruction =====
45% infer_compute_ql_at_arrival(at, at_jobid, rt, rt_jobid,
class, R) -> ql
46codegen -config cfg infer_compute_ql_at_arrival -args ...
47 {col_vec_type, col_vec_type, col_vec_type, col_vec_type, col_vec_type, scal_type}