LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
matlab
examples
advanced
loadDependent
ld_fes_singleclass.m
1
clear 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
10
N1 = 5; % number of jobs
11
12
%% Original 4-station tandem network with 1 class
13
model = Network('
OriginalModel
');
14
15
node{1} = Delay(model, '
Delay
');
16
node{2} = Queue(model, '
Q1
', SchedStrategy.PS);
17
node{3} = Queue(model, '
Q2
', SchedStrategy.PS);
18
node{4} = Queue(model, '
Q3
', SchedStrategy.PS);
19
20
jobclass{1} = ClosedClass(model, '
Class1
', N1, node{1}, 0);
21
22
node{1}.setService(jobclass{1}, Exp.fitMean(5.0));
23
node{2}.setService(jobclass{1}, Exp.fitMean(1.5));
24
node{3}.setService(jobclass{1}, Exp.fitMean(1.0));
25
node{4}.setService(jobclass{1}, Exp.fitMean(0.8));
26
27
P = model.initRoutingMatrix();
28
P{1,1} = [0 1 0 0; 0 0 1 0; 0 0 0 1; 1 0 0 0];
29
model.link(P);
30
31
%% Solve original model
32
fprintf('
MVA (original):\n
');
33
AvgOrig = SolverMVA(model, '
method
', '
exact
').getAvgTable;
34
disp(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
40
fprintf('
NC (FES model):\n
');
41
AvgNC = SolverNC(fesModel, '
method
', '
exact
').getAvgTable;
42
disp(AvgNC);
jobclass
Definition
fes_single_class.m:23
Generated by
1.9.8