1classdef (Sealed) PatienceType
2 % Enumeration of customer impatience types.
4 % Copyright (c) 2012-2026, Imperial College London
8 RENEGING = 1; % Customer abandons after joining the queue (currently supported)
9 BALKING = 2; % Customer refuses to join based on queue state (future support)
13 function text = toText(type)
16 % Convert patience type constant to text description
18 case PatienceType.RENEGING
20 case PatienceType.BALKING
23 line_error(mfilename,
'Unrecognized patience type.');
27 function
id = toId(type)
30 % Convert patience type constant to numeric ID
34 function type = fromId(
id)
37 % Convert numeric ID to patience type constant
40 type = PatienceType.RENEGING;
42 type = PatienceType.BALKING;
44 line_error(mfilename, sprintf(
'Unrecognized patience type ID: %d',
id));