![]() |
Virtual Belgium
2.0
A micro-simulation platform for the Belgian population
|
Main VirtualBelgium class. More...
#include <Model.hpp>
Public Member Functions | |
| Model (boost::mpi::communicator *comm, repast::Properties &props) | |
| Constructor. More... | |
| ~Model () | |
| Destructor. More... | |
| void | initSchedule () |
| Initialisation of the simulation's schedule. More... | |
| void | step () |
| Implements one step of the simulation. More... | |
| void | computeActivityChains () |
| Generates the travel demand forecasting via activity chains model. More... | |
| void | computePopulationEvolution () |
| Computes the socio-demographic evolution of the population. More... | |
| void | resetAggregateOutputs () |
| Reset every aggregate data set to 0. More... | |
| void | writeIndividuals () |
| Save the agents state of the current process' Individual shared context in a file. More... | |
| void | writeActivityChains () |
| Write the Individual agents plans to an XML file that can be processed with MATSim. More... | |
| void | saveActivityLocalizationAndTime () |
| Save activities localization and when they are performed. More... | |
| void | saveODMatrix () |
| Save origin-destination matrices for several time slots. More... | |
| void | providePackage (Individual *agent, std::vector< IndividualPackage > &out) |
| Used by Repast HPC to exchange Individual agents between process. More... | |
| void | providePackage (Household *agent, std::vector< HouseholdPackage > &out) |
| Used by Repast HPC to exchange Households agents between process. More... | |
| Individual * | createAgent (IndividualPackage package) |
| Used by Repast HPC to create an Individual Agent from an IndividualPackage. More... | |
| Household * | createAgent (HouseholdPackage package) |
| Used by Repast HPC to create an Household Agent from an HouseholdPackage. More... | |
| void | provideContent (repast::AgentRequest req, std::vector< IndividualPackage > &out) |
| Used by Repast HPC exchange Individuals agents between processes. More... | |
| void | provideContent (repast::AgentRequest req, std::vector< HouseholdPackage > &out) |
| Used by Repast HPC exchange Households agents between processes. More... | |
| void | updateAgent (IndividualPackage package) |
| Used by Repast HPC to update a local copy of an Individual agent with the data of the actual agent. More... | |
| void | updateAgent (HouseholdPackage package) |
| Used by Repast HPC to update a local copy of an Household agent with the data of the actual agent. More... | |
Public Attributes | |
| repast::SharedContext< Individual > | agents |
| Shared context containing the individual agents of the simulation. More... | |
| repast::SharedContext< Household > | agentsHh |
| Shared context containing the household agents of the simulation. More... | |
Private Attributes | |
| int | _proc |
| rank of the model's process More... | |
| repast::Properties | _props |
| properties of the model More... | |
| repast::SVDataSet * | _data_out |
| aggregated output data set More... | |
| AggregateSum * | _deathMenSum |
| aggregated number of death (men) More... | |
| AggregateSum * | _deathWomenSum |
| aggregated number of death (women) More... | |
| AggregateSum * | _babyBoySum |
| aggregated number of death More... | |
| AggregateSum * | _babyGirlSum |
| aggregated number of death More... | |
| AggregateSum * | _menSum |
| aggregated number of men More... | |
| AggregateSum * | _girlSum |
| aggregated number of women More... | |
| AggregateSum * | _age0MSum |
| aggregated number of men in age class 0 More... | |
| AggregateSum * | _age1MSum |
| aggregated number of men in age class 1 More... | |
| AggregateSum * | _age2MSum |
| aggregated number of men in age class 2 More... | |
| AggregateSum * | _age3MSum |
| aggregated number of men in age class 3 More... | |
| AggregateSum * | _age4MSum |
| aggregated number of men in age class 4 More... | |
| AggregateSum * | _age5MSum |
| aggregated number of men in age class 5 More... | |
| AggregateSum * | _age6MSum |
| aggregated number of men in age class 6 More... | |
| AggregateSum * | _age7MSum |
| aggregated number of men in age class 7 More... | |
| AggregateSum * | _age8MSum |
| aggregated number of men in age class 8 More... | |
| AggregateSum * | _age9MSum |
| aggregated number of men in age class 9 More... | |
| AggregateSum * | _age10MSum |
| aggregated number of men in age class 10 More... | |
| AggregateSum * | _age0WSum |
| aggregated number of women in age class 0 More... | |
| AggregateSum * | _age1WSum |
| aggregated number of women in age class 1 More... | |
| AggregateSum * | _age2WSum |
| aggregated number of women in age class 2 More... | |
| AggregateSum * | _age3WSum |
| aggregated number of women in age class 3 More... | |
| AggregateSum * | _age4WSum |
| aggregated number of women in age class 4 More... | |
| AggregateSum * | _age5WSum |
| aggregated number of women in age class 5 More... | |
| AggregateSum * | _age6WSum |
| aggregated number of women in age class 6 More... | |
| AggregateSum * | _age7WSum |
| aggregated number of women in age class 7 More... | |
| AggregateSum * | _age8WSum |
| aggregated number of women in age class 8 More... | |
| AggregateSum * | _age9WSum |
| aggregated number of women in age class 9 More... | |
| AggregateSum * | _age10WSum |
| aggregated number of women in age class 10 More... | |
| unsigned int | _n_activity_start_time_x_ins [589][24] |
| Number of starting activities time of the day by municipality. More... | |
| unsigned int | _n_activity_end_time_x_ins [589][24] |
| Number of ending activities performed / time of the day by municipality (also trip start) More... | |
| unsigned int | _origin_destination_matrix [589][589] |
| Origin-Destination matrix between municipalities. More... | |
| unsigned int | _origin_destination_matrix_mp [589][589] |
| Origin-Destination matrix between municipalities (morning peak: 7:00 - 9:00) More... | |
| unsigned int | _origin_destination_matrix_ep [589][589] |
| Origin-Destination matrix between municipalities (evening peak: 15:00 - 19:00) More... | |
| int | _babyId |
| Id initialized for the babies. More... | |
Friends | |
| class | ProviderReceiver |
Main VirtualBelgium class.
This class contains the scheduler and responsible for data aggregation. It is the core of VirtualBelgium.
| Model::Model | ( | boost::mpi::communicator * | comm, |
| repast::Properties & | props | ||
| ) |
Constructor.
| Model::~Model | ( | ) |
Destructor.
| void Model::computeActivityChains | ( | ) |
Generates the travel demand forecasting via activity chains model.
| void Model::computePopulationEvolution | ( | ) |
Computes the socio-demographic evolution of the population.
| Individual * Model::createAgent | ( | IndividualPackage | package | ) |
Used by Repast HPC to create an Individual Agent from an IndividualPackage.
| package | a package containing an individual agent |
| Household * Model::createAgent | ( | HouseholdPackage | package | ) |
Used by Repast HPC to create an Household Agent from an HouseholdPackage.
| package | a package containing an household agent |
| void Model::initSchedule | ( | ) |
Initialisation of the simulation's schedule.
| void Model::provideContent | ( | repast::AgentRequest | req, |
| std::vector< IndividualPackage > & | out | ||
| ) |
Used by Repast HPC exchange Individuals agents between processes.
| req | the set of requested agents |
| out | the vector containing the packaged requested agents |
| void Model::provideContent | ( | repast::AgentRequest | req, |
| std::vector< HouseholdPackage > & | out | ||
| ) |
Used by Repast HPC exchange Households agents between processes.
| req | the set of requested agents |
| out | the vector containing the packaged requested agents |
| void Model::providePackage | ( | Individual * | agent, |
| std::vector< IndividualPackage > & | out | ||
| ) |
Used by Repast HPC to exchange Individual agents between process.
| agent | the agent to exchange |
| out | the package containing the agent to exchange |
| void Model::providePackage | ( | Household * | agent, |
| std::vector< HouseholdPackage > & | out | ||
| ) |
Used by Repast HPC to exchange Households agents between process.
| agent | the agent to exchange |
| out | the package containing the agent to exchange |
| void Model::resetAggregateOutputs | ( | ) |
Reset every aggregate data set to 0.
| void Model::saveActivityLocalizationAndTime | ( | ) |
Save activities localization and when they are performed.
| void Model::saveODMatrix | ( | ) |
Save origin-destination matrices for several time slots.
| void Model::step | ( | ) |
Implements one step of the simulation.
| void Model::updateAgent | ( | IndividualPackage | package | ) |
Used by Repast HPC to update a local copy of an Individual agent with the data of the actual agent.
| package | a package containing the updated informations |
| void Model::updateAgent | ( | HouseholdPackage | package | ) |
Used by Repast HPC to update a local copy of an Household agent with the data of the actual agent.
| pacjage | a package containing the updated informations |
| void Model::writeActivityChains | ( | ) |
Write the Individual agents plans to an XML file that can be processed with MATSim.
| void Model::writeIndividuals | ( | ) |
Save the agents state of the current process' Individual shared context in a file.
|
friend |
|
private |
aggregated number of men in age class 0
|
private |
aggregated number of women in age class 0
|
private |
aggregated number of men in age class 10
|
private |
aggregated number of women in age class 10
|
private |
aggregated number of men in age class 1
|
private |
aggregated number of women in age class 1
|
private |
aggregated number of men in age class 2
|
private |
aggregated number of women in age class 2
|
private |
aggregated number of men in age class 3
|
private |
aggregated number of women in age class 3
|
private |
aggregated number of men in age class 4
|
private |
aggregated number of women in age class 4
|
private |
aggregated number of men in age class 5
|
private |
aggregated number of women in age class 5
|
private |
aggregated number of men in age class 6
|
private |
aggregated number of women in age class 6
|
private |
aggregated number of men in age class 7
|
private |
aggregated number of women in age class 7
|
private |
aggregated number of men in age class 8
|
private |
aggregated number of women in age class 8
|
private |
aggregated number of men in age class 9
|
private |
aggregated number of women in age class 9
|
private |
aggregated number of death
|
private |
aggregated number of death
|
private |
Id initialized for the babies.
|
private |
aggregated output data set
|
private |
aggregated number of death (men)
|
private |
aggregated number of death (women)
|
private |
aggregated number of women
|
private |
aggregated number of men
|
private |
Number of ending activities performed / time of the day by municipality (also trip start)
|
private |
Number of starting activities time of the day by municipality.
|
private |
Origin-Destination matrix between municipalities.
|
private |
Origin-Destination matrix between municipalities (evening peak: 15:00 - 19:00)
|
private |
Origin-Destination matrix between municipalities (morning peak: 7:00 - 9:00)
|
private |
rank of the model's process
|
private |
properties of the model
| repast::SharedContext<Individual> Model::agents |
Shared context containing the individual agents of the simulation.
| repast::SharedContext<Household> Model::agentsHh |
Shared context containing the household agents of the simulation.