LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
Det.m
1classdef Det < ContinuousDistribution & DiscreteDistribution
2 % Det Deterministic distribution with constant value
3 %
4 % Det represents a deterministic distribution that always produces the same
5 % constant value. This distribution has zero variance and is commonly used
6 % for modeling constant service times, fixed delays, or deterministic
7 % processing requirements in queueing systems.
8 %
9 % @brief Deterministic distribution with constant value and zero variance
10 %
11 % Key characteristics:
12 % - Single parameter: constant value t
13 % - Zero variance (SCV = 0)
14 % - Mean = Variance = t
15 % - All samples equal to t
16 % - Degenerate case of all distributions
17 %
18 % The deterministic distribution is used for:
19 % - Constant service times
20 % - Fixed processing delays
21 % - Deterministic timeouts
22 % - Modeling perfectly predictable processes
23 % - Lower bound analysis in queueing systems
24 %
25 % Example:
26 % @code
27 % constant_service = Det(2.5); % Always takes exactly 2.5 time units
28 % samples = constant_service.sample(100); % All samples = 2.5
29 % @endcode
30 %
31 % Copyright (c) 2012-2026, Imperial College London
32 % All rights reserved.
33
34 properties
35 end
36
37 methods
38 function self = Det(t)
39 % DET Create a deterministic distribution instance
40 %
41 % @brief Creates a deterministic distribution with constant value t
42 % @param t Constant value (must be non-negative for time-based processes)
43 % @return self Det distribution instance with constant value t
44 self@ContinuousDistribution('Det',1,[t,t]);
45 self@DiscreteDistribution('Det',1,[t,t]);
46 setParam(self, 1, 't', t);
47 end
48
49 function ex = getMean(self)
50 % EX = GETMEAN()
51
52 % Get distribution mean
53 ex = self.getParam(1).paramValue;
54 end
55
56 function SCV = getSCV(self)
57 % SCV = GETSCV()
58
59 % Get distribution squared coefficient of variation (SCV = variance / mean^2)
60 SCV = 0;
61 end
62
63 function L = evalLST(self, s)
64 % L = EVALST(S)
65
66 % Evaluate the Laplace-Stieltjes transform of the distribution function at t
67
68 t = self.getParam(1).paramValue;
69
70 L = exp(-s*t);
71 end
72
73 function X = sample(self, n)
74 % X = SAMPLE(N)
75
76 % Get n samples from the distribution
77 X = self.getParam(1).paramValue * ones(n,1);
78 end
79
80 function Ft = evalCDF(self,t)
81 % FT = EVALCDF(SELF,T)
82
83 % Evaluate the cumulative distribution function at t
84 % AT T
85
86 if t < self.getParam(1).paramValue
87 Ft = 0;
88 else
89 Ft = 1;
90 end
91 end
92
93 function proc = getProcess(self)
94 % PROC = GETPROCESS()
95
96 % Get process representation with actual distribution parameters
97 % Returns {t} for deterministic value
98 proc = {self.getParam(1).paramValue};
99 end
100 end
101
102 methods (Static)
103 function d = fitMean(t)
104 d=Det(t);
105 end
106 end
107
108end
109