# Reconstruction of Epidemiological Data in Hungary Using Stochastic Model Predictive Control
## 2 Compartmental Model of the Spread of the COVID-19 Epidemic in Hungary
### Transitions between the Phases of the Disease  
To capture the spread and the evolution of the COVID-19 epidemic, we considered a modified version of the compartmental model introduced in [21]. This model divides the population of \(\mathbf{N}\) individuals into eight classes, representing the different stages of the illness. The compartments of the model correspond to the following subsets/groups of the population: susceptible individuals (\(\mathbf{S}\)), infected people in the latent (\(\mathbf{L}\)) and the pre-symptomatic (\(\mathbf{P}\)) phases, infected people in the main sequence of the disease (\(\mathbf{A}\), \(\mathbf{I}\)), infected people who need hospital treatment (\(\mathbf{H}\)), and finally, the recovered (\(\mathbf{R}\)) and deceased (\(\mathbf{D}\)) people. The main phase of the disease is further divided into those who remain asymptomatic (\(\mathbf{A}\)) and those who produce symptoms (\(\mathbf{I}\)). In this work, the model of [21] was complemented with a new compartment (**U**) comprising all individuals who became immune through vaccination. The members of this compartment are governed by the daily number of vaccinated people (**V**). A discrete-time (DT) version of the augmented continuous-time model was obtained through the explicit Euler method with a 1 d-long sampling period. The dynamic equations are given as follows:  
\[\mathbf{S}_{k+1} = \mathbf{S}_{k}\ -\ \ \beta_{k}(\mathbf{P}_{k}+\mathbf{I}_{k}+ \delta\mathbf{A}_{k})\mathbf{S}_{k}/\mathbf{N}\ -\ \
u\ \mathbf{S}_{k}\over\mathbf{S}_{k+\mathbf{R}_{k}} \mathbf{V}_{k}, \tag{1a}\] \[\mathbf{L}_{k+1} = \mathbf{L}_{k}\ +\ \ \beta_{k}(\mathbf{P}_{k}+\mathbf{I}_{k}+ \delta\mathbf{A}_{k})\mathbf{S}_{k}/\mathbf{N}\ -\ \alpha\ \mathbf{L}_{k},\] (1b) \[\mathbf{P}_{k+1} = \mathbf{P}_{k}\ +\ \ \alpha\ \mathbf{L}_{k}\ -\ \zeta\ \mathbf{P}_{k},\] (1c) \[\mathbf{I}_{k+1} = \mathbf{I}_{k}\ +\ \ \gamma\,\zeta\,\mathbf{P}_{k}\ -\ \rho_{1}\mathbf{I}_{k},\] (1d) \[\mathbf{A}_{k+1} = \mathbf{A}_{k}\ +\ \ (1-\gamma)\,\zeta\,\mathbf{P}_{k}\ -\ \rho_{A}\, \mathbf{A}_{k},\] (1e) \[\mathbf{H}_{k+1} = \mathbf{H}_{k}\ +\ \ \rho_{1}\,\eta\,\mathbf{I}_{k}\ -\ \lambda\, \mathbf{H}_{k},\] (1f) \[\mathbf{R}_{k+1} = \mathbf{R}_{k}\ +\ \ \rho_{1}(1-\eta)\,\mathbf{I}_{k}\ +\ \rho_{A}\, \mathbf{A}_{k}\ +\ (1-\mu)\,\lambda\,\mathbf{H}_{k}\ -\ \
u\ \mathbf{S}_{k+\mathbf{R}_{k}} \mathbf{V}_{k},\] (1g) \[\mathbf{D}_{k+1} = \mathbf{D}_{k}\ +\ \mu\,\lambda\,\mathbf{H}_{k},\] (1h) \[\mathbf{U}_{k+1} = \mathbf{U}_{k}\ +\ \
u\,\mathbf{V}_{k}. \tag{1i}\]  
The transitions between the compartments are illustrated in Figure 1. It is worth mentioning that the recovered's compartment **R** contains the recovered people who are not yet vaccinated. To represent all the recovered people including the vaccinated, we can consider the following additional equation:  
\[\mathbf{L}_{k+1} = \mathbf{L}_{k}\ +\ \ \beta_{k}(\mathbf{P}_{k}+\mathbf{I}_{k}+ \delta\mathbf{A}_{k})\mathbf{S}_{k}/\mathbf{N}\ -\ \alpha\ \mathbf{L}_{k},\]0  
which clearly does not affect the dynamics of other states. The detailed worldwide [54] and local serological [55] and dynamical [7; 20; 56; 57] analysis results provide estimates for the average lengths of the phases of the illness and the probabilities of transitions between the compartments. These parameters are aligned with the Hungary-specific data and were presented in detail in [21]. After infection, the latent period of the disease (**L**) usually lasts approximately \(\alpha^{-1}=2.5\) d. This period is followed by a pre-symptomatic phase (**P**) of \(\zeta^{-1}=3\) d. A person in the main sequence of the disease (**I** or **A**) remains infectious for about \(\rho_{I}^{-1}=\rho_{A}^{-1}=4\) d. The empirical probability of producing symptoms in the main sequence is \(\gamma=0.6\); furthermore, an \(\eta=0.076\) portion of the symptomatic cases require hospitalization. The average length of a hospital treatment is \(\lambda^{-1}=10\) d. A hospitalized patient dies with a probability of \(\mu=0.205\), or recovers.