LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
get_serviceDis.m
1function [ S, s, sigma ] = get_serviceDis( mean, choice, CX2 )
2
3% return the PH representation (s,S) of the required distribution
4% mean: mean rate of the distribution
5% choice: the targeted distribution, where 1 = Exp, 2 = HE2, 3 = ER2
6
7if (choice == 1)
8 % Exponential distribution:Exp
9 S = -mean;
10 s = mean;
11 sigma = 1;
12
13elseif (choice == 2)
14 % 2-phase Hyper-exponential distribution: HE2
15 [ lambda1,lambda2,a ] = estimateH2( mean,CX2 );
16 S = [-lambda1,0; 0,-lambda2];
17 s = [lambda1; lambda2];
18 sigma = [a,1-a];
19
20elseif (choice == 3)
21 % 2-phase Erlang distribution: ER2
22 v = 2*mean;
23 S = [-v,v;0,-v];
24 s = [0;v];
25 sigma = [1,0];
26end
27
28
29