23 #include "repast_hpc/SharedContext.h"
24 #include "repast_hpc/Schedule.h"
25 #include "repast_hpc/Random.h"
26 #include "repast_hpc/Properties.h"
27 #include "repast_hpc/Utilities.h"
28 #include "repast_hpc/io.h"
29 #include "repast_hpc/logger.h"
30 #include "repast_hpc/initialize_random.h"
31 #include "repast_hpc/SVDataSetBuilder.h"
40 #include <boost/serialization/access.hpp>
41 #include <boost/lexical_cast.hpp>
42 #include <boost/mpi.hpp>
43 #include <boost/mpi/collectives.hpp>
44 #include <boost/mpi/communicator.hpp>
45 #include <boost/unordered_set.hpp>
104 repast::SharedContext<Individual>
agents;
112 Model( boost::mpi::communicator* comm, repast::Properties & props );
179 void provideContent(repast::AgentRequest req, std::vector<IndividualPackage>& out);
186 void provideContent(repast::AgentRequest req, std::vector<HouseholdPackage>& out);
AggregateSum * _age10MSum
aggregated number of men in age class 10
Definition: Model.hpp:80
AggregateSum * _babyGirlSum
aggregated number of death
Definition: Model.hpp:66
The package structure for Individual agents.
Definition: Individual.hpp:48
AggregateSum * _age3WSum
aggregated number of women in age class 3
Definition: Model.hpp:85
Individual agents related classes and methods declarations.
Model(boost::mpi::communicator *comm, repast::Properties &props)
Constructor.
Definition: Model.cpp:17
AggregateSum * _age7WSum
aggregated number of women in age class 7
Definition: Model.hpp:89
int _babyId
Id initialized for the babies.
Definition: Model.hpp:100
AggregateSum * _babyBoySum
aggregated number of death
Definition: Model.hpp:65
~Model()
Destructor.
Definition: Model.cpp:314
void providePackage(Individual *agent, std::vector< IndividualPackage > &out)
Used by Repast HPC to exchange Individual agents between process.
Definition: Model.cpp:339
unsigned int _origin_destination_matrix_mp[589][589]
Origin-Destination matrix between municipalities (morning peak: 7:00 - 9:00)
Definition: Model.hpp:97
unsigned int _origin_destination_matrix[589][589]
Origin-Destination matrix between municipalities.
Definition: Model.hpp:96
AggregateSum * _age6MSum
aggregated number of men in age class 6
Definition: Model.hpp:76
repast::Properties _props
properties of the model
Definition: Model.hpp:60
AggregateSum * _age8MSum
aggregated number of men in age class 8
Definition: Model.hpp:78
void updateAgent(IndividualPackage package)
Used by Repast HPC to update a local copy of an Individual agent with the data of the actual agent...
Definition: Model.cpp:396
void step()
Implements one step of the simulation.
Definition: Model.cpp:431
AggregateSum * _age1WSum
aggregated number of women in age class 1
Definition: Model.hpp:83
void computeActivityChains()
Generates the travel demand forecasting via activity chains model.
Definition: Model.cpp:470
AggregateSum * _age5MSum
aggregated number of men in age class 5
Definition: Model.hpp:75
void saveActivityLocalizationAndTime()
Save activities localization and when they are performed.
Definition: Model.cpp:940
AggregateSum * _age3MSum
aggregated number of men in age class 3
Definition: Model.hpp:73
void writeIndividuals()
Save the agents state of the current process' Individual shared context in a file.
Definition: Model.cpp:790
unsigned int _n_activity_end_time_x_ins[589][24]
Number of ending activities performed / time of the day by municipality (also trip start) ...
Definition: Model.hpp:95
Data related class and methods.
AggregateSum * _age6WSum
aggregated number of women in age class 6
Definition: Model.hpp:88
The package structure for Household agents.
Definition: Household.hpp:50
void resetAggregateOutputs()
Reset every aggregate data set to 0.
Definition: Model.cpp:761
AggregateSum * _deathWomenSum
aggregated number of death (women)
Definition: Model.hpp:64
AggregateSum * _age1MSum
aggregated number of men in age class 1
Definition: Model.hpp:71
friend class ProviderReceiver
Definition: Model.hpp:57
AggregateSum * _age4MSum
aggregated number of men in age class 4
Definition: Model.hpp:74
void initSchedule()
Initialisation of the simulation's schedule.
Definition: Model.cpp:317
void computePopulationEvolution()
Computes the socio-demographic evolution of the population.
Definition: Model.cpp:585
AggregateSum * _girlSum
aggregated number of women
Definition: Model.hpp:68
Main VirtualBelgium class.
Definition: Model.hpp:53
repast::SVDataSet * _data_out
aggregated output data set
Definition: Model.hpp:61
unsigned int _origin_destination_matrix_ep[589][589]
Origin-Destination matrix between municipalities (evening peak: 15:00 - 19:00)
Definition: Model.hpp:98
void provideContent(repast::AgentRequest req, std::vector< IndividualPackage > &out)
Used by Repast HPC exchange Individuals agents between processes.
Definition: Model.cpp:378
AggregateSum * _deathMenSum
aggregated number of death (men)
Definition: Model.hpp:63
void saveODMatrix()
Save origin-destination matrices for several time slots.
Definition: Model.cpp:1061
AggregateSum * _age9MSum
aggregated number of men in age class 9
Definition: Model.hpp:79
AggregateSum * _age4WSum
aggregated number of women in age class 4
Definition: Model.hpp:86
AggregateSum * _age0WSum
aggregated number of women in age class 0
Definition: Model.hpp:82
AggregateSum * _age2WSum
aggregated number of women in age class 2
Definition: Model.hpp:84
repast::SharedContext< Household > agentsHh
Shared context containing the household agents of the simulation.
Definition: Model.hpp:105
Individual * createAgent(IndividualPackage package)
Used by Repast HPC to create an Individual Agent from an IndividualPackage.
Definition: Model.cpp:362
AggregateSum * _age10WSum
aggregated number of women in age class 10
Definition: Model.hpp:92
AggregateSum * _age2MSum
aggregated number of men in age class 2
Definition: Model.hpp:72
Aggregate output data class.
Definition: Data.hpp:344
Household agents related classes and methods declarations.
unsigned int _n_activity_start_time_x_ins[589][24]
Number of starting activities time of the day by municipality.
Definition: Model.hpp:94
AggregateSum * _age0MSum
aggregated number of men in age class 0
Definition: Model.hpp:70
AggregateSum * _age8WSum
aggregated number of women in age class 8
Definition: Model.hpp:90
The individual agent class.
Definition: Individual.hpp:122
AggregateSum * _age7MSum
aggregated number of men in age class 7
Definition: Model.hpp:77
AggregateSum * _age5WSum
aggregated number of women in age class 5
Definition: Model.hpp:87
int _proc
rank of the model's process
Definition: Model.hpp:59
The household agent class.
Definition: Household.hpp:110
AggregateSum * _age9WSum
aggregated number of women in age class 9
Definition: Model.hpp:91
void writeActivityChains()
Write the Individual agents plans to an XML file that can be processed with MATSim.
Definition: Model.cpp:835
repast::SharedContext< Individual > agents
Shared context containing the individual agents of the simulation.
Definition: Model.hpp:104
AggregateSum * _menSum
aggregated number of men
Definition: Model.hpp:67