LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getLimitedClassDependencePeak.m
1function peak = getLimitedClassDependencePeak(self)
2% peak = GETLIMITEDCLASSDEPENDENCEPEAK()
3%
4% Returns an (nstations x nclasses) matrix of the declared peak (maximum)
5% class-dependent rate scaling per class. Used to normalize utilization at
6% class-dependent stations as Util = T*S/peak (the same T*S/c convention as
7% ordinary multiserver stations). A station's scalar peak is broadcast across
8% all classes; non class-dependent stations are left as NaN.
9
10% Copyright (c) 2012-2026, Imperial College London
11% All rights reserved.
12
13M = getNumberOfStations(self);
14K = getNumberOfClasses(self);
15peak = NaN(M,K);
16for i=1:M
17 if ~isempty(self.stations{i}.lcdScaling)
18 pk = self.stations{i}.lcdScalingPeak;
19 if isempty(pk)
20 line_error(mfilename, sprintf('Class-dependent station %d has no declared peak rate; use setClassDependence(beta, peakRatePerClass).', i));
21 end
22 if isscalar(pk)
23 peak(i,:) = pk;
24 elseif numel(pk) == K
25 peak(i,:) = pk(:)';
26 else
27 line_error(mfilename, sprintf('peakRatePerClass at station %d must be a scalar or a vector of length nclasses=%d.', i, K));
28 end
29 end
30end
31end
Definition Station.m:245