1%{ @file mmap_compress.m
2 % @brief Compresses an
MMAP into a smaller representation
4 % @author LINE Development Team
8 % @brief Compresses a Marked MAP into a smaller representation
11 % This function compresses an
MMAP (Marked Markovian Arrival Process) into
12 % a smaller representation
using various compression methods including
13 % mixture fitting, MAMAP2, and M3PP approaches.
23 % <tr><th>Name<th>Description
24 % <tr><td>
MMAP<td>Original Marked Markovian Arrival Process
25 % <tr><td>config<td>(Optional) Configuration
struct with compression method
30 % <tr><th>Name<th>Description
34function
MMAP = mmap_compress(
MMAP, config)
35if nargin<1%~exist(
'config',
'var')
38if ~isfield(config,'method')
39 config.method = 'default';
44 case {
'default',
'mixture',
'mixture.order1'}
45 lambda = mmap_lambda(
MMAP);
46 AMAPs = mmap_maps(
MMAP);
48 mn = map_mean(AMAPs{k});
49 fitted = mmpp2_fit1(mn,map_scv(AMAPs{k}),map_skew(AMAPs{k}),map_idc(AMAPs{k}));
51 AMAPs{k} = map_exponential(mn);
56 MMAP = mmap_mixture(lambda/sum(lambda), AMAPs);
64 MMAP = mamap2m_fit_gamma_fb_mmap(
MMAP);
65 case 'm3pp.approx_cov'
66 MMAP = m3pp2m_fitc_theoretical(
MMAP,
'approx_cov', 1, 1e6); %derivest
68 MMAP = m3pp2m_fitc_theoretical(
MMAP,
'approx_ag', 1, 1e6); %derivest
69 case 'm3pp.exact_delta'
70 MMAP = m3pp2m_fitc_theoretical(
MMAP,
'exact_delta', 1, 1e6); %derivest
71 case 'm3pp.approx_delta'
72 MMAP = m3pp2m_fitc_theoretical(
MMAP,
'approx_delta', 1, 1e6); %derivest