## 3 Supervised Selection of the Control Gains
### Updating Algorithms
(**a**) Evolution of model’s populations. (**b**) Active gain from \(S_{KV}\) parameterizing the vaccination action. (**c**) Active gain from \(S_{KT}\) parameterizing the treatment action. (**d**) Index representing the active model from \(S_{\beta}\) parameterizing the transmission rate. Figure 2:0 Performance of the system with seasonal incidence rate and vaccination and treatment actions tuned by Algorithm 2. (**a**) Evolution of model’s populations. (**b**) Index representing the active gain from \(S_{KV}\) parameterizing the vaccination action. (**c**) Index representing the active gain from \(S_{KT}\) parameterizing the treatment action. (**d**) Index representing the active model from \(S_{\beta}\) parameterizing the transmission rate. Finally, an example of Algorithm 4 concludes this section. Thus, consider the same seasonal system as introduced in Algorithm 2. Now, according to Algorithm 4 there will be two models for each gain set initialized with \(k_{V}(0)=k_{T}(0)=0\), \(\Delta k_{V}(0)=\Delta k_{T}(0)=0.003\) and the same parameters as before. In this case the gains are updated through time by using a heuristic that takes into account the performance of the supervisory loss function in the previous switching times, as pointed out by equations in Algorithm 4, the evolution of the system is given in Figure 9a. Additionally, the values of the gains are depicted in Figure 9b,c. It can be deduced from these figures that the algorithm is able to eradicate the infection but the Susceptible do not converge to zero, neither. This happens because the algorithm selects to apply only the treatment action instead of both actions, vaccination and treatment, as Figure 9 shows. Moreover, the vanishing rate for the Infectious is smaller when using the Algorithm 4 in comparison to Algorithm 3. The main reason for this relies on the fact that the number of models is more reduced now since it goes from 36 of Algorithm 3 to just 4 of Algorithm 4. Hence, the computational burden is being reduced for Algorithm 4. It can also be concluded from Figure 9c that the Algorithm is able to adapt the value of the gain to the appropriate one in order to eradicate the infection. In this Figure it can also be observed how the variation steps of the Algorithm decrease so that the change of the gain is smaller as time goes by. Figure 10a,b show the vaccination and treatment controls for Algorithms 2, 3 and 4. It can be noticed that Algorithms 3 and 4 only select the treatment action to deal with the persistency of the infections (i.e., the vaccination is identically zero) while Algorithm 2 selects both actions. As a consequence, the susceptible subpopulation does not converge to zero when using the last two algorithms. Figure 2:1 Performance of the system with seasonal incidence rate and vaccination and treatment actions tuned by Algorithm 4. (**a**) Evolution of model’s populations. (**b**) Active gain \(k_{V}(t)\). (**c**) Active gain \(k_{T}(t)\). On the other hand, the treatment action for Algorithms 2 and 3 is similar while Algorithm 4 applies a treatment action that is more extended in time resulting in larger infective periods. Thus, the peak of the action is smaller than in the previous approaches but it takes more time to eradicate the infection. In conclusion, the switching mechanisms presented in Section 3 based on the supervisory loss function frame are able to eradicate the infection by selecting the most appropriate gains at each time interval. Moreover, Figure 10 allows comparing the performance of Algorithms 2, 3 and 4 for the case of seasonality. It can be concluded that the smaller the control actions are, the larger the infectious subpopulation peak and the infective period are. Therefore, the selection of the algorithm can be conducted depending on the control objectives and the available resources.