LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
RandomMAP.m
1% [D0, D1] = RandomMAP(order, mean, zeroEntries, maxTrials, prec)
2%
3% Returns a random Markovian arrival process with given mean
4% value.
5%
6% Parameters
7% ----------
8% order : int
9% The size of the MAP
10% mean : double, optional
11% The mean inter-arrival times of the MAP
12% zeroEntries : int, optional
13% The number of zero entries in the D0 and D1 matrices
14% maxTrials : int, optional
15% The maximum number of trials to find a proper MAP
16% (that has an irreducible phase process and none of
17% its parameters is all-zero)
18% prec : double, optional
19% Numerical precision for checking the irreducibility.
20% The default value is 1e-14.
21%
22% Returns
23% -------
24% D0 : vector, shape (1,M)
25% The D0 matrix of the MAP
26% D1 : matrix, shape (M,M)
27% The D1 matrix of the MAP
28
29function [D0,D1] = RandomMAP(order, mean, zeroEntries, maxTrials, prec)
30
31 if ~exist('zeroEntries','var')
32 zeroEntries = 0;
33 end
34
35 if ~exist('mean','var')
36 mean = 1;
37 end
38
39 if ~exist('prec','var')
40 prec = 1e-7;
41 end
42
43 if ~exist('maxTrials','var')
44 maxTrials = 1000;
45 end
46
47 D = RandomMMAP(order, 1, mean, zeroEntries, maxTrials, prec);
48 D0=D{1};
49 D1=D{2};
50end