1classdef Linkage < OutputSection
2 % An output section dispatching jobs to a destination
4 % Copyright (c) 2012-2026, Imperial College London
9 function self = Linkage(customerClasses)
10 % SELF = DISPATCHER(CUSTOMERCLASSES)
12 self@OutputSection(
'Linkage');
13 self.outputStrategy = {};
14 initDispatcherJobClasses(self, customerClasses);
19 function initDispatcherJobClasses(self, customerClasses)
20 % INITDISPATCHERJOBCLASSES(CUSTOMERCLASSES)
22 for r = 1 : length(customerClasses)
23 self.outputStrategy{r} = {customerClasses{r}.name, RoutingStrategy.RAND};
27 function setStrategy(self, customerClasses, strategy)
28 % SETSTRATEGY(CUSTOMERCLASSES, STRATEGY)
31 self.outputStrategy{customerClasses{r}.index} = {customerClasses{r}.name, strategy};
33 for r = 1 : length(customerClasses)
34 self.outputStrategy{customerClasses{r}.index} = {customerClasses{r}.name, strategy{r}};