Stride Reference Manual
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
DiseaseProfile.cpp
Go to the documentation of this file.
1
/*
2
* This is free software: you can redistribute it and/or modify it
3
* under the terms of the GNU General Public License as published by
4
* the Free Software Foundation, either version 3 of the License, or
5
* any later version.
6
* The software is distributed in the hope that it will be useful,
7
* but WITHOUT ANY WARRANTY; without even the implied warranty of
8
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
* GNU General Public License for more details.
10
* You should have received a copy of the GNU General Public License
11
* along with the software. If not, see <http://www.gnu.org/licenses/>.
12
*
13
* Copyright 2015, Willem L, Kuylen E, Stijven S & Broeckhove J
14
*/
15
21
#include "
DiseaseProfile.h
"
22
23
namespace
stride
{
24
25
using namespace
std
;
26
using namespace
boost::property_tree
;
27
28
void
DiseaseProfile::initialize
(
const
ptree& pt_config,
const
ptree& pt_disease) {
29
// Use linear model fitted to simulation data: Expected(R0) = (b0+b1*transm_rate).
30
const
double
r0 = pt_config.get<
double
>(
"run.r0"
);
31
const
double
b0 = pt_disease.get<
double
>(
"disease.transmission.b0"
);
32
const
double
b1 = pt_disease.get<
double
>(
"disease.transmission.b1"
);
33
m_transmission_rate = (r0 - b0) / b1;
34
}
35
36
}
37
stride
Time Dependent Person DataType.
Definition:
NoBehaviour.h:17
property_tree
stride::DiseaseProfile::initialize
void initialize(const boost::property_tree::ptree &pt_config, const boost::property_tree::ptree &pt_disease)
Initialize.
Definition:
DiseaseProfile.cpp:28
std
STL namespace.
DiseaseProfile.h
Disease profile.
main
cpp
core
DiseaseProfile.cpp
Generated on Tue Jun 27 2017 15:38:18 for Stride Reference Manual by
1.8.11