LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
gallery_detm1.m
1function model = gallery_detm1()
2% GALLERY_DETM1 Create a D/M/1 queue model (deterministic arrivals, exponential service)
3%
4% This model demonstrates the effect of deterministic (constant) inter-arrival
5% times compared to exponential arrivals. The deterministic arrival process
6% has zero variance, which typically reduces queue length and response time
7% variability compared to the M/M/1 model.
8%
9% Model Configuration:
10% - Arrival process: Deterministic with rate 1.0 (inter-arrival time = 1.0)
11% - Service process: Exponential with rate 2.0 (mean service time = 0.5)
12% - Traffic intensity: ρ = λ/μ = 1.0/2.0 = 0.5 (stable)
13% - Scheduling: First-Come-First-Served (FCFS)
14%
15% Returns:
16% model - Network object containing the configured D/M/1 queue
17%
18% Examples:
19% model = gallery_detm1();
20% solver = CTMC(model);
21% solver.solve();
22% avg_table = solver.getAvgTable()
23%
24% Notes:
25% - D/M/1 queues typically have lower response time variance than M/M/1
26% - The deterministic arrival process eliminates arrival variability
27% - This model is useful for studying the impact of arrival time variability
28% - System utilization is 50% (ρ = 0.5)
29%
30% See Also:
31% gallery_mm1, gallery_erlm1
32
33model = Network('D/M/1');
34
35%% Block 1: nodes
36source = Source(model, 'mySource');
37queue = Queue(model, 'myQueue', SchedStrategy.FCFS);
38sink = Sink(model, 'mySink');
39
40%% Block 2: classes
41oclass = OpenClass(model, 'myClass');
42source.setArrival(oclass, Det(1));
43queue.setService(oclass, Exp(2));
44
45%% Block 3: topology
46model.link(Network.serialRouting(source, queue, sink));
47
48end
Definition mmt.m:92