LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
RandomSource.m
1classdef RandomSource < InputSection
2 % An input section generating arrivals from the external world at random
3 % times
4 %
5 % Copyright (c) 2012-2026, Imperial College London
6 % All rights reserved.
7
8 properties
9 sourceClasses;
10 end
11
12 methods
13 %Constructor
14 function self = RandomSource(classes)
15 % SELF = RANDOMSOURCE(CLASSES)
16
17 self@InputSection('RandomSource');
18 for i = 1 : length(classes)
19 self.sourceClasses{1,i} = {[],ServiceStrategy.LI,Disabled.getInstance()};
20 end
21 end
22 end
23
24 methods(Access = protected)
25 % Override copyElement method:
26 function clone = copyElement(self)
27 % CLONE = COPYELEMENT()
28
29 % Make a shallow copy of all properties
30 clone = copyElement@Copyable(self);
31 % Make a deep copy of each object
32 for i = 1 : length(self.sourceClasses)
33 clone.sourceClasses{1,i}{3} = self.sourceClasses{1,i}{3}.copy;
34 end
35 end
36 end
37
38end
39