1classdef (Sealed) ImpatienceType
2 % Enumeration of customer impatience types.
4 % Copyright (c) 2012-2026, Imperial College London
8 RENEGING = 1; % Customer abandons after joining the queue (timer-based)
9 BALKING = 2; % Customer refuses to join based on queue state
10 RETRIAL = 3; % Customer moves to orbit and retries after delay
14 function text = toText(type)
17 % Convert impatience type constant to text description
19 case ImpatienceType.RENEGING
21 case ImpatienceType.BALKING
23 case ImpatienceType.RETRIAL
26 line_error(mfilename,
'Unrecognized impatience type.');
30 function
id = toId(type)
33 % Convert impatience type constant to numeric ID
37 function type = fromId(
id)
40 % Convert numeric ID to impatience type constant
43 type = ImpatienceType.RENEGING;
45 type = ImpatienceType.BALKING;
47 type = ImpatienceType.RETRIAL;
49 line_error(mfilename, sprintf(
'Unrecognized impatience type ID: %d',
id));