1classdef (Sealed) RemovalPolicy
2 % Enumeration of removal policies
for negative signals in G-networks.
4 % When a negative signal (or catastrophe) arrives at a queue and removes
5 % positive customers, the removal policy determines which customers are
6 % selected
for removal.
9 % - RANDOM: Uniform random selection from all jobs at the station
10 % - FCFS: Remove oldest jobs first (first-come-first-served order)
11 % - LCFS: Remove newest jobs first (last-come-first-served order)
13 % Copyright (c) 2012-2026, Imperial College London
14 % All rights reserved.
17 RANDOM = 0; % Uniform random selection
18 FCFS = 1; % Remove oldest jobs first
19 LCFS = 2; % Remove newest jobs first
23 function text = toText(policy)
24 % TEXT = TOTEXT(POLICY) Convert policy to text representation
26 case RemovalPolicy.RANDOM
28 case RemovalPolicy.FCFS
30 case RemovalPolicy.LCFS
33 line_error(mfilename,
'Unrecognized removal policy.');
37 function policy = fromText(text)
38 % POLICY = FROMTEXT(TEXT) Convert text to policy constant
44 policy = RemovalPolicy.RANDOM;
46 policy = RemovalPolicy.FCFS;
48 policy = RemovalPolicy.LCFS;
50 line_error(mfilename,
'Unrecognized removal policy text.');