LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
RetrialPolicy.m
1classdef (Sealed) RetrialPolicy
2 % Enumeration of retrial policies for an orbiting population.
3 %
4 % The policy fixes how the aggregate rate at which the orbit attempts to
5 % re-enter the station depends on the orbit size n:
6 %
7 % LINEAR - each orbiting customer retries independently at rate nu, so
8 % the aggregate retrial rate is n*nu. This is the classical
9 % retrial queue of Falin and Templeton.
10 % CONSTANT - the orbit as a whole retries at rate nu whenever it is
11 % non-empty, independently of n. This models a single retrial
12 % controller shared by the orbit rather than per-customer
13 % timers.
14 %
15 % Copyright (c) 2012-2026, Imperial College London
16 % All rights reserved.
17
18 properties (Constant)
19 LINEAR = 1;
20 CONSTANT = 2;
21 end
22
23 methods (Static)
24 function text = toText(type)
25 % TEXT = TOTEXT(TYPE)
26 switch type
27 case RetrialPolicy.LINEAR
28 text = 'linear';
29 case RetrialPolicy.CONSTANT
30 text = 'constant';
31 otherwise
32 line_error(mfilename, 'Unrecognized retrial policy type.');
33 end
34 end
35
36 function type = fromText(text)
37 % TYPE = FROMTEXT(TEXT)
38 switch lower(text)
39 case {'linear','per-customer','falin'}
40 type = RetrialPolicy.LINEAR;
41 case {'constant','fixed','controller'}
42 type = RetrialPolicy.CONSTANT;
43 otherwise
44 line_error(mfilename, sprintf('Unrecognized retrial policy ''%s''.', text));
45 end
46 end
47 end
48end