LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
ServiceStation.m
1classdef ServiceStation < Station
2 % An abstract class for stations with service
3 %
4 % Copyright (c) 2012-2026, Imperial College London
5 % All rights reserved.
6
7 properties
8 schedPolicy;
9 schedStrategy;
10 schedStrategyPar;
11 serviceProcess;
12 end
13
14 methods (Hidden)
15 %Constructor
16 function self = ServiceStation(name)
17 % SELF = STATION(NAME)
18
19 self@Station(name);
20 end
21 end
22
23 methods
24 function distrib = getServiceProcess(self, oclass)
25 distrib = self.getService{oclass};
26 end
27
28 function self = removeJobClass(self, jobclass)
29 % SELF = REMOVEJOBCLASS(JOBCLASS)
30 %
31 % Drop the service process and the scheduling parameter of
32 % JOBCLASS, at the station and inside its server section, on top
33 % of what Station and Node remove.
34
35 remaining = self.remainingClassIndexes(jobclass);
36 removeJobClass@Station(self, jobclass);
37 K = numel(remaining) + 1;
38 if numel(self.schedStrategyPar) == K
39 self.schedStrategyPar = self.schedStrategyPar(remaining);
40 end
41 if numel(self.serviceProcess) == K
42 self.serviceProcess = self.serviceProcess(remaining);
43 end
44 if ~isempty(self.server) && isprop(self.server, 'serviceProcess') ...
45 && numel(self.server.serviceProcess) == K
46 self.server.serviceProcess = self.server.serviceProcess(remaining);
47 end
48 end
49 end
50end