LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
ld_fes_singleclass.m
1clear node jobclass
2
3% Single-class FES Aggregation with Norton's Theorem Verification
4%
5% This example demonstrates Norton's theorem for a closed single-class
6% queueing network: a subset of stations is replaced by a single
7% Flow-Equivalent Server (FES) whose load-dependent service rates
8% equal the throughputs of the isolated subnetwork.
9
10N1 = 5; % number of jobs
11
12%% Original 4-station tandem network with 1 class
13model = Network('OriginalModel');
14
15node{1} = Delay(model, 'Delay');
16node{2} = Queue(model, 'Q1', SchedStrategy.PS);
17node{3} = Queue(model, 'Q2', SchedStrategy.PS);
18node{4} = Queue(model, 'Q3', SchedStrategy.PS);
19
20jobclass{1} = ClosedClass(model, 'Class1', N1, node{1}, 0);
21
22node{1}.setService(jobclass{1}, Exp.fitMean(5.0));
23node{2}.setService(jobclass{1}, Exp.fitMean(1.5));
24node{3}.setService(jobclass{1}, Exp.fitMean(1.0));
25node{4}.setService(jobclass{1}, Exp.fitMean(0.8));
26
27P = model.initRoutingMatrix();
28P{1,1} = [0 1 0 0; 0 0 1 0; 0 0 0 1; 1 0 0 0];
29model.link(P);
30
31%% Solve original model
32fprintf('MVA (original):\n');
33AvgOrig = SolverMVA(model, 'method', 'exact').getAvgTable;
34disp(AvgOrig);
35
36%% Aggregate Q1, Q2, Q3 into FES and solve with NC (convolution)
37[fesModel, ~, ~] = ModelAdapter.aggregateFES(model, ...
38 {node{2}, node{3}, node{4}}, struct('solver','mva','verbose',false));
39
40fprintf('NC (FES model):\n');
41AvgNC = SolverNC(fesModel, 'method', 'exact').getAvgTable;
42disp(AvgNC);