Line data Source code
1 : /* 2 : * Copyright (C) 2020-2024 MEmilio 3 : * 4 : * Authors: Lena Ploetzke 5 : * 6 : * Contact: Martin J. Kuehn <Martin.Kuehn@DLR.de> 7 : * 8 : * Licensed under the Apache License, Version 2.0 (the "License"); 9 : * you may not use this file except in compliance with the License. 10 : * You may obtain a copy of the License at 11 : * 12 : * http://www.apache.org/licenses/LICENSE-2.0 13 : * 14 : * Unless required by applicable law or agreed to in writing, software 15 : * distributed under the License is distributed on an "AS IS" BASIS, 16 : * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 : * See the License for the specific language governing permissions and 18 : * limitations under the License. 19 : */ 20 : 21 : #ifndef IDE_SEIR_PARAMS_H 22 : #define IDE_SEIR_PARAMS_H 23 : 24 : #include "memilio/math/eigen.h" 25 : #include "memilio/epidemiology/uncertain_matrix.h" 26 : #include "memilio/utils/parameter_set.h" 27 : 28 : namespace mio 29 : { 30 : namespace iseir 31 : { 32 : /**************************************************** 33 : * define some parameters used in the IDE SEIR model * 34 : *****************************************************/ 35 : 36 : /** 37 : * @brief The time of latency used in the IDE SEIR model. 38 : * 39 : * Latency time is the average time from infection to the onset of infectivity used in the model. 40 : * Latency time is measured in days. 41 : */ 42 : struct LatencyTime { 43 : using Type = double; 44 2 : static constexpr Type get_default() 45 : { 46 2 : return 3.3; 47 : } 48 : }; 49 : 50 : /** 51 : * @brief The infectious time used in the IDE SEIR model. 52 : * 53 : * Infectious time is the average time from onset of infectivity to recovery used in the model. 54 : * Infectious time is measured in days. 55 : */ 56 : struct InfectiousTime { 57 : using Type = double; 58 2 : static constexpr Type get_default() 59 : { 60 2 : return 8.2; 61 : } 62 : }; 63 : 64 : /** 65 : * @brief The risk of transmission in the event of a contact used in the IDE SEIR model. 66 : * 67 : * The transmission risk is the average risk to get infected in the event of a contact, 68 : * given that the contact takes place between a susceptible and an infected person. 69 : */ 70 : struct TransmissionRisk { 71 : using Type = double; 72 2 : static constexpr Type get_default() 73 : { 74 2 : return 0.1; 75 : } 76 : }; 77 : 78 : /** 79 : * @brief The contact frequency is modeled using an UncertainContactMatrix. 80 : * 81 : * The contact frequency is the average number of contact of an individual per day. 82 : * We use the type UncertainContactMatrix, because of the Randomness in this variable. 83 : * Via this parameter, dampings can be included to simulate non-pharmaceutical interventions. 84 : */ 85 : template <typename FP = double> 86 : struct ContactFrequency { 87 : using Type = UncertainContactMatrix<FP>; 88 2 : static Type get_default() 89 : { 90 2 : ContactMatrixGroup contact_matrix = ContactMatrixGroup(1, 1); 91 2 : contact_matrix[0] = mio::ContactMatrix(Eigen::MatrixXd::Constant(1, 1, 10.)); 92 4 : return Type(contact_matrix); 93 2 : } 94 : }; 95 : 96 : // Define Parameterset for IDE SEIR model. 97 : template <typename FP = double> 98 : using ParametersBase = ParameterSet<TransmissionRisk, LatencyTime, InfectiousTime, ContactFrequency<FP>>; 99 : 100 : } // namespace iseir 101 : } // namespace mio 102 : 103 : #endif