1classdef Server < ServiceSection
2 % Server Basic non-preemptive service section
for job processing
4 % Server implements a basic service section that processes jobs according
5 % to non-preemptive disciplines. It manages service processes
for different
6 % job
classes and coordinates with scheduling sections to provide complete
7 % queueing station functionality.
9 % @brief Non-preemptive service section with
class-dependent service processes
11 % Key characteristics:
12 % - Non-preemptive job service
13 % - Class-dependent service time distributions
14 % - Single or multiple server support
15 % - Load-independent service strategies
16 % - Integration with scheduling disciplines
19 % - Service process management per
class
20 % - Service time distribution configuration
21 % - Server capacity specification
22 % - Load-independent operation
23 % - Deep copy support
for model cloning
26 % - Basic FCFS and LCFS queues
27 % - Priority queue service sections
28 % - Multi-server queue implementations
29 % - Load-independent service modeling
30 % - Class-differentiated service systems
34 %
classes = {OpenClass(model,
'Class1'), ClosedClass(model,
'Class2', 5)};
36 % server.setServiceProcess(1, 1, Exp(2.0)); % Class1 service
39 % Copyright (c) 2012-2026, Imperial College London
40 % All rights reserved.
45 % SERVER Create a basic server section instance
47 % @brief Creates a Server section for non-preemptive job processing
48 % @param
classes Cell array of JobClass objects to be served
49 % @return self Server instance configured for the specified
classes
51 self@ServiceSection('Server');
52 self.numberOfServers = 1;
53 self.serviceProcess = {};
58 methods (Access =
'private')
59 function initServers(self,
classes)
60 % INITSERVERS(CLASSES)
63 self.serviceProcess{1, i} = {
classes{i}.name, ServiceStrategy.LI, Exp(0.0)};
68 methods(Access =
protected)
69 % Override copyElement method:
70 function clone = copyElement(self)
71 % CLONE = COPYELEMENT()
73 % Make a shallow copy of all properties
74 clone = copyElement@Copyable(self);
75 % Make a deep copy of each
object
76 for i = 1 : length(self.serviceProcess)
77 if ishandle(clone.serviceProcess{1,i}{3})
78 %
this is a problem
if one modifies the
classes in the
79 % model because the one below
is not an handle so it
80 % will not be modified
81 clone.serviceProcess{1,i}{3} = self.serviceProcess{1,i}{3}.copy;