LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
gallery_cqn.m
1function model = gallery_cqn(M, useDelay, seed)
2model = Network('Single-class CQN');
3%% Block 1: nodes
4
5if nargin==0
6 M=2;
7end
8if nargin<2
9 useDelay = false;
10end
11if nargin<3
12 seed = 23000;
13end
14rng(seed);
15for i=1:M
16 station{i} = Queue(model, ['Queue',num2str(i)], SchedStrategy.PS);
17end
18if useDelay
19 station{M+1} = Delay(model, 'Delay1');
20end
21%% Block 2: classes
22jobclass = ClosedClass(model, 'Class1', round(rand*M+2), station{1}, 0);
23
24for i=1:M
25 station{i}.setService(jobclass, Exp.fitMean(rand()+i)); % (Queue 1,Class1)
26end
27
28if useDelay
29 station{M+1}.setService(jobclass, Exp.fitMean(2.0)); % (Delay 1,Class1)
30end
31
32%% Block 3: topology
33P = model.initRoutingMatrix(); % initialize routing matrix
34P{jobclass,jobclass} = Network.serialRouting(station);
35model.link(P);
36end
Definition mmt.m:92