LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
gallery_erlm1ps.m
1function model = gallery_erlm1ps()
2% GALLERY_ERLM1PS Create an Erlang/M/1-PS queue model (Erlang arrivals, exponential service, processor sharing)
3%
4% This model uses Erlang-distributed inter-arrival times with processor sharing
5% scheduling. Processor sharing means all jobs in the system share the server
6% capacity equally, which is different from FCFS scheduling.
7%
8% Model Configuration:
9% - Arrival process: Erlang with mean 1.0 and 5 phases (lower variance)
10% - Service process: Exponential with rate 2.0 (mean service time = 0.5)
11% - Traffic intensity: ρ = λ/μ = 1.0/2.0 = 0.5 (stable)
12% - Scheduling: Processor Sharing (PS)
13%
14% Returns:
15% model - Network object containing the configured Erlang/M/1-PS queue
16%
17% Examples:
18% model = gallery_erlm1ps();
19% solver = MAM(model);
20% solver.solve();
21% avg_table = solver.getAvgTable()
22%
23% Notes:
24% - Processor sharing provides fairness among jobs
25% - All jobs receive service simultaneously with equal share
26% - Response time independent of service order
27% - Useful for modeling time-shared computer systems
28%
29% See Also:
30% gallery_erlm1, gallery_mm1, gallery_mm1ps
31
32model = Network('Er/M/1-PS');
33
34%% Block 1: nodes
35source = Source(model, 'mySource');
36queue = Queue(model, 'myQueue', SchedStrategy.PS);
37sink = Sink(model, 'mySink');
38
39%% Block 2: classes
40oclass = OpenClass(model, 'myClass');
41source.setArrival(oclass, Erlang.fitMeanAndOrder(1, 5));
42queue.setService(oclass, Exp(2));
43
44%% Block 3: topology
45model.link(Network.serialRouting(source, queue, sink));
46
47end
Definition mmt.m:92