41 #include <boost/property_tree/ptree.hpp> 42 #include <spdlog/spdlog.h> 58 using uint =
unsigned int;
59 namespace run {
class Runner; }
80 const std::shared_ptr<const Population> getPopulation()
const;
83 void setTrackIndexCase(
bool track_index_case);
85 void setName(
string name) { m_name = name; }
89 void setCommunicationMap(
const std::map<string, AsyncSimulator*>& comm_map) { m_communication_map = comm_map; }
99 const std::vector<Cluster>& getClusters(
ClusterType cluster_type)
const;
102 std::vector<std::string> getRngStates()
const;
105 void setRngStates(std::vector<std::string> states);
110 uint chooseCluster(
const GeoCoordinate& coordinate,
const vector<Cluster>& clusters,
double influence);
119 hostForeignTravellers(
const vector<Simulator::TravellerType>& travellers,
uint days,
string destination_district,
120 string destination_facility);
126 bool welcomeHomeTravellers(
const vector<uint>& travellers_indices,
const vector<Health>& health_status);
129 void returnForeignTravellers();
131 void sendNewTravellers(
uint amount,
uint days,
const string& destination_sim_id,
string destination_district,
132 string destination_facility);
147 const std::vector<District>&
getDistricts()
const {
return m_districts; }
156 template<LogMode log_level,
bool track_index_case = false>
157 void updateClusters();
162 #if UNIPAR_IMPL == UNIPAR_DUMMY 165 using RandomRef = std::unique_ptr<util::Random>;
175 boost::property_tree::ptree m_config_pt;
176 boost::property_tree::ptree m_config_pop;
177 std::shared_ptr<spdlog::logger> m_logger;
192 bool m_track_index_case;
void setName(string name)
const std::vector< Cluster > & getPrimaryCommunities() const
Interface/Implementation of Subject.
You can see this class as a kind of planner that stores events in the near future.
Time Dependent Person DataType.
Main class that contains and direct the virtual world.
Class that keeps track of the 'state' of simulated world.
Header file for the Person class.
A district is either a city or a village (currently, there is no difference between city and village)...
Header for the Random Number Generator class.
std::map< unsigned int, Simulator::TravellerType > m_trav_hosting
Container for persons in population.
Forward declaration of class Person.
unipar::Parallel Parallel
Header for the District class.
const std::vector< Cluster > & getSchoolClusters() const
Definition of ClusterType.
Main class that contains and direct the virtual world.
const std::vector< Cluster > & getWorkClusters() const
LogMode
Enum specifiying the level of logging required:
const std::vector< Cluster > & getSecondaryCommunities() const
Header for the LogMode class.
std::map< unsigned int, Simulator::TravellerType > m_trav_elsewhere
Represents a location for social contacts, an group of people.
Template for Subject/Observer (or Publish/Subscribe).
void setCommunicationMap(const std::map< string, AsyncSimulator * > &comm_map)
const SimplePlanner< Traveller< Simulator::PersonType > > & getPlanner() const
const std::vector< Cluster > & getHouseholds() const
ClusterType
Enumerates the cluster types.
unsigned int m_num_threads
The number of threads(as a hint)
const std::vector< District > & getDistricts() const
The random number generator.
const Calendar & getCalendar() const
Return the calendar of this simulator.