Stride Reference Manual  1.0
SimulatorBuilder.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This is free software: you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * any later version.
7  * The software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License
12  * along with the software. If not, see <http://www.gnu.org/licenses/>.
13  *
14  * Copyright 2017, Willem L, Kuylen E, Stijven S & Broeckhove J
15  */
16 
22 #include "Simulator.h"
23 #include "core/ClusterType.h"
24 #include "util/GeoCoordinate.h"
25 
26 #include <boost/property_tree/ptree.hpp>
27 #include <memory>
28 #include <string>
29 #include <map>
30 #include <utility>
31 
32 namespace stride {
33 
34 class Population;
35 
36 class Calendar;
37 
42 public:
43 
45  static std::shared_ptr<Simulator> build(
46  const boost::property_tree::ptree& pt_config);
47 
49  static std::shared_ptr<Simulator> build(
50  const boost::property_tree::ptree& pt_config,
51  const boost::property_tree::ptree& pt_disease,
52  const boost::property_tree::ptree& pt_contact);
53 
54 private:
56  static void initializeClusters(
57  std::shared_ptr<Simulator> sim,
58  const boost::property_tree::ptree& pt_config);
59 
61  static void initializeDistricts(
62  std::shared_ptr<Simulator> sim,
63  const boost::property_tree::ptree& pt_config);
64 
68  static std::map<std::pair<ClusterType, uint>, util::GeoCoordinate> initializeLocations(std::string filename);
69 
72  static void initializeFacilities(
73  std::shared_ptr<Simulator> sim,
74  const boost::property_tree::ptree& pt_config);
75 };
76 
77 }
78 
static void initializeDistricts(std::shared_ptr< Simulator > sim, const boost::property_tree::ptree &pt_config)
Initialize the districts, duplicate city names are ignored (only the first occurrence is counted) ...
Time Dependent Person DataType.
Definition: NoBehaviour.h:17
Main class that contains and direct the virtual world.
Header for the Simulator class.
Definition of ClusterType.
static void initializeClusters(std::shared_ptr< Simulator > sim, const boost::property_tree::ptree &pt_config)
Initialize the clusters.
static std::shared_ptr< Simulator > build(const boost::property_tree::ptree &pt_config)
Build simulator.
static std::map< std::pair< ClusterType, uint >, util::GeoCoordinate > initializeLocations(std::string filename)
Initialize the locations (read the from the given file) and return them If the filename is ""...
static void initializeFacilities(std::shared_ptr< Simulator > sim, const boost::property_tree::ptree &pt_config)
Initialize the facilities, duplicate facility names are ignored (only the first occurrence is counted...