## 3 Supervised Selection of the Control Gains
### Updating Algorithms
10 Preparatory Step 2: Parameterize a set \(\text{M}\) of \(n_{V}n_{T}\) normalized epidemic models \(m_{ij}=m_{ij}\big{(}p_{ij}\big{)}\) of the structure as (1)-(3) parameterized by the parameter vector \(p_{ij}=\big{(}\beta,\,\gamma\,,k_{V_{i}}\,,k_{T_{j}}\big{)}\in\textsf{R}_{+}^{ 2}\times\textsf{S}_{K_{V}}\times\textsf{S}_{K_{T}}\), each one being parameterized by the same transmission rate and recovery rate associated to the disease under study and by some pair ofcontrol gains \(\big{(}k_{V_{i}},\,k_{T_{j}}\big{)}\in\textsf{S}_{KY}\times\textsf{S}_{KT}\). 16 Preparatory Step 3: Define a set \(n_{V}n_{T}\) supervisory loss functions, each one being associated to its: \(\text{correspond}\text{correspond}\text{ind}\text{ }m_{ij}\in\textsf{M}=\big{(}m_{ij}\big{)}\) as follows: \(J_{ij}(t)=-\textsf{f}_{0}^{t}\lambda(t)\ln\textsf{J}_{ij}(\tau)^{t_{ij}(\tau)} +(1-\lambda(\tau))ln\textsf{S}_{ij}(\tau)^{S_{ij}(\tau)}\lambda\tau_{i}\gamma m _{ij}\in\textsf{M}\) and a design weighting function \(\lambda:\textsf{R}_{0+}\to[0\,,\,1]\) for the suitable combination of the
* 21 evaluation of the partial losses of Infectious and Susceptible. * 22 Step 0:
* 23 Fix identical initial conditions \(I_{ij}(0)=I(0)\), \(S_{ij}(0)=1-I(0)\) and \(R_{ij}(0)=0\), either by data acquisition or from \" a priori\" knowledge, for each \(m_{ij}=m_{ij}\big{(}p_{ij}\big{)}\) of the same same same structure as (1)-(3) each being parameterized by the parameter vector \(p_{ij}=\big{(}\beta,\gamma,k_{V_{i}},k_{T_{i}}\big{)}\in\mathbf{R}_{+}^{2}\times S _{K_{V}}\times S_{K_{T}}\) from illness \"a priori\" knowledge. * 24 Choose some active controlled \(m_{active}(1)=m_{ij}\) for some \(m_{ij}\in\mathrm{M}\) for initialization from the given set and fix and accumulated loss function above, for \(t=0\) stored as \(\mathbf{ALocLoss}\gets 0\). * 25 Fix a minimum residence time \(T_{\min}>0\) for each active controller in operation at any time interval. * 26 Define the first switching time instant, the first element of the set of switching time instants and the first element of the set of active models as \(t_{i}=0\) for \(i=1\), \(\mathbf{ST}=\{t_{i}\}\) and \(\mathbf{ACTM}=[m_{active}(i)]\), respectively. * 27 Define the set of time-interval supervisory loss functions below: \(\int_{0}^{t_{i}}(t_{i})=-\bigg{(}\int_{0}^{t_{i}}\lambda(\tau)\ln I_{ij}(\tau )^{t_{j}(\tau)}+(1-\lambda(\tau))\ln S_{ij}(\tau)^{S_{ij}(\tau)}d\tau\bigg{)} \forall m_{ij}\in\mathrm{M}\) whose initial values are zero since \(t_{i}=0\). * 28 Define a final time \(t_{end}\) to stop the algorithm to run. * 29 For instance, \(t_{end}=\min\left[\min(t\in\mathbf{R}_{+}:\,(t\geq T_{\min})\wedge(I(t)\leq\varepsilon) )\,,\,T_{max}\right]\) for some given sufficiently small \(\varepsilon\in\mathbf{R}_{+}\) and some sufficiently large \(T_{max}\geq T_{\min}\). * 20 Step 1:
* 21 Run all the set of models \(\mathbf{M}\) with computation of their subpopulations evolution from (1)-(3)and their associated supervisory losses functions (10) through time by generating the control interventions of the active model \(m_{active}\) to the true populations. * 22 Run all the set of models \(\mathbf{M}\) with computation of their subpopulations evolution from (1)-(3) and their associated supervisory losses functions through a time interval \([t_{i}\,,\,t_{i}+T_{min})\) by generating the control interventions of the active model \(m_{active}\) to the true populations by fixing \(J_{active}(t)=J_{m_{active}}(t_{i})\); \(\forall t\in[t_{i}\,,\,t_{i}+T_{\min})\). * 23 Step 3:
* 24 While \(J_{active}^{loc}(t)=\min\bigg{(}J_{qj}^{loc}(t_{i}+T_{i})\,:\,m_{qj}\in\mathrm{M }\bigg{)}\) the active model continues to be \(m_{active}\) of (1)-(3) and their associated supervisory losses functions through a time interval \([t_{i}\,,\,t_{i}+T_{min})\) by generating the control interventions of the active model \(m_{active}\) to the true populations by fixing \(J_{active}(t)=J_{m_{active}}(t_{i})\); \(\forall t\in[t_{i}\,,\,t_{i}+T_{\min})\).