LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
InfiniteServer.m
1classdef InfiniteServer < ServiceSection
2 % A service section to delay jobs without contention
3 %
4 % Copyright (c) 2012-2026, Imperial College London
5 % All rights reserved.
6
7 methods
8 %Constructor
9 function self = InfiniteServer(customerClasses)
10 % SELF = INFINITESERVER(CUSTOMERCLASSES)
11
12 self@ServiceSection('InfiniteServer');
13 self.numberOfServers = Inf;
14 self.serviceProcess = {};
15 initServers(self, customerClasses);
16 end
17 end
18
19 methods (Access = 'private')
20 function initServers(self, customerClasses)
21 % INITSERVERS(CUSTOMERCLASSES)
22 for i = 1 : length(customerClasses)
23 self.serviceProcess{1, i} = {customerClasses{i}.name, ServiceStrategy.LI, Exp(0.0)};
24 end
25 end
26 end
27
28 methods(Access = protected)
29 % Override copyElement method:
30 function clone = copyElement(self)
31 % CLONE = COPYELEMENT()
32
33 % Make a shallow copy of all properties
34 clone = copyElement@Copyable(self);
35 % Make a deep copy of each object
36 for i=1:length(self.serviceProcess)
37 if ishandle(self.serviceProcess{i}{3})
38 clone.serviceProcess{i}{3} = self.serviceProcess{i}{3}.copy;
39 end
40 end
41 end
42 end
43
44end
45