Model Class Reference
|
CPP API
|
#include <model.h>
Public Member Functions | |
| TimeSeries< ScalarType > const & | calculate_EIR () |
| Calculate the distribution of the population in E, I and, R based on the calculated values for S. More... | |
| Model (TimeSeries< ScalarType > &&init, ScalarType dt_init, int N_init, const Pa &Parameterset_init=Pa()) | |
| Create an IDE SEIR model. More... | |
| TimeSeries< ScalarType > const & | simulate (int t_max) |
| Simulate the evolution of infection numbers with the given IDE SEIR model. More... | |
Public Attributes | |
| Pa | parameters {} |
Private Types | |
| using | Pa = ParametersBase |
| using | Vec = Eigen::VectorX< ScalarType > |
Private Member Functions | |
| ScalarType | central_difference_quotient (TimeSeries< ScalarType > const &ts_ide, InfectionState compartment, Eigen::Index idx) const |
| Numerical differentiation of one compartment using a central difference quotient. More... | |
| ScalarType | generalized_beta_distribution (ScalarType tau, ScalarType p=3.0, ScalarType q=10.0) const |
| Density of the generalized beta distribution used for the function f_{beta} of the IDE SEIR model. More... | |
| ScalarType | num_integration_inner_integral (Eigen::Index idx) const |
| Numerical integration of the inner integral of the integro-differential equation for the group S using a trapezoidal sum. More... | |
Private Attributes | |
| ScalarType | m_dt {0} |
| Eigen::Index | m_k {0} |
| Eigen::Index | m_l {0} |
| int | m_N {0} |
| TimeSeries< ScalarType > | m_result |
| TimeSeries< ScalarType > | m_result_SEIR |
Member Typedef Documentation
◆ Pa
|
private |
◆ Vec
|
private |
Constructor & Destructor Documentation
◆ Model()
|
inline |
Create an IDE SEIR model.
- Parameters
-
[in,out] init TimeSeries with the initial values of the number of susceptibles at associated initial times. The time steps in this vector should be equidistant and equal to the time step used for the simulation. A certain history of time steps and values for susceptibles is needed. A warning is displayed if the condition is violated. Co be more precise, the first time point needs to be smaller than -(k-1)*TimeStep with k=ceil((InfectiousTime + LatencyTime)/TimeStep). The last time point in this vector should be a time 0. [in] dt_init The size of the time step used for numerical simulation. [in] N_init The population of the considered region.
Member Function Documentation
◆ calculate_EIR()
|
inline |
Calculate the distribution of the population in E, I and, R based on the calculated values for S.
The values are calculated using the average latency and infection time, not using model equations. The simulated values of S are used for this purpose, so the simulate() function should be called beforehand.
- Returns
- The result of the calculation stored in an TimeSeries. The TimeSeries contains the simulation time and an associated Vector with values for S, E, I, and R.
◆ central_difference_quotient()
|
inlineprivate |
Numerical differentiation of one compartment using a central difference quotient.
- Parameters
-
[in] ts_ide TimeSeries with the time steps already calculated. Used as function values in numerical differentiation. [in] idx Time index at which the numerical differentiation should be performed. [in] compartment Compartment for which the numerical differentiation is to be performed.
- Returns
- Numerically approximated derivative of the function belonging to the compartment at the point t[idx].
◆ generalized_beta_distribution()
|
inlineprivate |
Density of the generalized beta distribution used for the function f_{beta} of the IDE SEIR model.
- Parameters
-
[in] tau evaluation point of the generalized Beta distribution. [in] p parameter p of the generalized Beta distribution. [in] q parameter q of the generalized Beta distribution.
- Returns
- Evaluation of the generalized beta distribution at the given evaluation point.
◆ num_integration_inner_integral()
|
inlineprivate |
Numerical integration of the inner integral of the integro-differential equation for the group S using a trapezoidal sum.
- Parameters
-
[in] idx Index of the point of time used in the inner integral.
- Returns
- Result of the numerical integration.
◆ simulate()
|
inline |
Simulate the evolution of infection numbers with the given IDE SEIR model.
The simulation is performed by solving the underlying model equation numerically. Here, an integro-differential equation is to be solved. The model parameters and the initial data are used.
- Parameters
-
[in] t_max Last simulation day. If the last point of time of the initial TimeSeries was 0, the simulation will be executed for t_max days.
- Returns
- The result of the simulation, stored in a TimeSeries with simulation time and associated number of susceptibles.
Member Data Documentation
◆ m_dt
|
private |
◆ m_k
|
private |
◆ m_l
|
private |
◆ m_N
|
private |
◆ m_result
|
private |
◆ m_result_SEIR
|
private |
◆ parameters
| Pa mio::iseir::Model::parameters {} |
Generated by