![]() |
Virtual Belgium
2.0
A micro-simulation platform for the Belgian population
|
A data class. More...
#include <Data.hpp>
Public Member Functions | |
| Data (repast::Properties aProps) | |
| Constructor. More... | |
| virtual | ~Data () |
| Destructor. More... | |
| void | read_mun_age_men () |
| Read the age's distribution by municipality for the men. More... | |
| void | read_mun_age_women () |
| Read the age's distribution by municipality for the women. More... | |
| void | read_death_age () |
| Read the death probability by age and gender. More... | |
| void | read_birth_age () |
| Read the birth probability by age and the probability to have a boy or a girl. More... | |
| void | read_node_ins () |
| Read the municipalities's node. More... | |
| void | read_activity_cdb () |
| Read the activities' codebook. More... | |
| void | read_network () |
| Read the road network. More... | |
| void | read_distribution_parameters_distance () |
| Read the distribution parameters for activities' distance. More... | |
| void | read_distribution_parameters_house_tdep () |
| Read the distribution parameters for activities' house time departure. More... | |
| void | read_distribution_parameters_start_duration () |
| Read the distribution parameters for activities' starting time x duration. More... | |
| void | read_distribution_parameters_distance_x_duration_trip () |
| Read the distribution parameters for distance x duration of a trip. More... | |
| void | read_indicators () |
| Read the various indicators used by the activity localization model. More... | |
| void | read_ins_id_mun () |
| Read the codebooks of ins code and municipality id (1 to 589). More... | |
| std::vector< long int > | getMunAge (int municipality, char gender) |
| Get the age's distribution of a municipality for a given gender. More... | |
| float | getDeathProba (char gender, int age) |
| Compute and return the death's probability of an individual. More... | |
| float | getBirthProba (int age) |
| Compute and return the birth's probability of an individual by women's age. More... | |
| float | getBirthsex (int age) |
| Compute and return the probability to be a boy or girl. More... | |
| std::vector< long > | getNodesIdFromIns (int aIns) |
| Return the list of node of a given municipality identified by its INS code. More... | |
| long | getOneNodeIdFromIns (int aIns) |
| Return one node of a given municipality identified by its INS code. More... | |
| dist_param_mixture | getActDistParDist (int aActivityType) |
| Return the distance's distribution's parameter of a given activity type. More... | |
| dist_param_mixture | getActHouseTDepParDist (int aActivityType) |
| Return the house departure time distribution's parameter for a given activity type. More... | |
| dist_param_mixture | getActDurationCondiStartParDist (int aActivityType, int aStartTime) |
| Return the activity duration distribution's parameter conditional to a starting time for a given activity type. More... | |
| dist_param_mixture | getDurationCondiDistTripParDist (int aDistance) |
| Return a journey duration distribution's parameters conditional to the journey distance. More... | |
| const Network & | getNetwork () const |
| Return the road network. More... | |
| const std::map< char, int > & | getMapActCharToInt () const |
| Return the character to integer activity code-book. More... | |
| const std::map< int, char > & | getMapActIntToChar () const |
| Return the integer to character activity code-book. More... | |
| const std::map< int, int > & | getMapInsIdMun () const |
| Return the codebook of municipalities ins code to their id (1 to 589). More... | |
| const std::map< int, int > & | getMapIdMunIns () const |
| Return the codebook of municipalities id (1 to 589) to their ins code. More... | |
Private Attributes | |
| std::map< int, std::vector < long > > | _mun_age_men |
| men's age distribution by municipality More... | |
| std::map< int, std::vector < long > > | _mun_age_women |
| women's age distribution by municipality More... | |
| std::map< int, float > | _death_age_men |
| death's probability for a man by age More... | |
| std::map< int, float > | _death_age_women |
| death's probability for a woman by age More... | |
| std::map< int, float > | _birth_age |
| birth's probability by women's age More... | |
| std::map< int, float > | _birth_men |
| birth's probability to have a boy More... | |
| std::multimap< int, long > | _map_ins_node |
| set of node by municipalities' ins code More... | |
| std::map< long, int > | _map_node_ins |
| ins code of node More... | |
| std::map< int, char > | _map_act_intToChar |
| activities' code-book (from integer to character encoding) More... | |
| std::map< char, int > | _map_act_charToInt |
| activities' code-book (from character to integer encoding) More... | |
| std::map< int, dist_param_mixture > | _map_act_dist_par_dist |
| distribution parameters for activities' distance (log normal) More... | |
| std::map< int, dist_param_mixture > | _map_act_tdep_par_dist |
| distribution parameters for activities' house departure time (log normal) More... | |
| std::map< int, dist_param_mixture_2d > | _map_act_start_x_dur |
| distribution parameters for activities' log(starting time) x log(duration) More... | |
| dist_param_mixture_2d | _act_dist_x_dur_trip_dist |
| distribution parameters for log(distance) x log(duration of the trip) More... | |
| Network | _network |
| road network More... | |
| std::map< int, long > | _indic_mun_size |
| size indicator of a municipality More... | |
| std::map< int, int > | _map_ins_id_mun |
| map of ins code (key) x id of municipality (value) More... | |
| std::map< int, int > | _map_id_mun_ins |
| map of id of municipality (key) x ins code (value) More... | |
| repast::Properties | _props |
| properties of simulation More... | |
Friends | |
| class | Singleton< Data > |
Additional Inherited Members | |
Static Public Member Functions inherited from Singleton< Data > | |
| static void | makeInstance (repast::Properties aProps) |
| Generates a singleton instance of a T object. More... | |
| static Data * | getInstance () |
| Return the generated, unique, instance of a T object (if already instanciated). More... | |
| static void | kill () |
| Free the memory. More... | |
Protected Member Functions inherited from Singleton< Data > | |
| Singleton () | |
| Constructor. More... | |
| ~Singleton () | |
| Destructor. More... | |
A data class.
A data class reading and producing all the inputs required by the various models of Virtual Belgium. This class is implemented using a singleton design pattern.
|
inline |
Constructor.
The constructor initialize all the private members of a Data object.
| aProps | the properties of VirtualBelgium, including paths to data files |
|
inlinevirtual |
Destructor.
| dist_param_mixture Data::getActDistParDist | ( | int | aActivityType | ) |
Return the distance's distribution's parameter of a given activity type.
| aActivityType | the type of an activity (integer coding) |
| dist_param_mixture Data::getActDurationCondiStartParDist | ( | int | aActivityType, |
| int | aStartTime | ||
| ) |
Return the activity duration distribution's parameter conditional to a starting time for a given activity type.
| aActivityType | type of an activity, integer coding |
| aStartTime | starting time of an activity |
| dist_param_mixture Data::getActHouseTDepParDist | ( | int | aActivityType | ) |
Return the house departure time distribution's parameter for a given activity type.
| aActivityType | the type of an activity (integer coding) |
| float Data::getBirthProba | ( | int | age | ) |
Compute and return the birth's probability of an individual by women's age.
| age | the age of the women |
| float Data::getBirthsex | ( | int | age | ) |
Compute and return the probability to be a boy or girl.
| age | the age of the mother |
| float Data::getDeathProba | ( | char | gender, |
| int | age | ||
| ) |
Compute and return the death's probability of an individual.
| gender | the gender of the individual |
| age | the age of the individual |
| dist_param_mixture Data::getDurationCondiDistTripParDist | ( | int | aDistance | ) |
Return a journey duration distribution's parameters conditional to the journey distance.
| aDistance | the distance performed |
|
inline |
Return the character to integer activity code-book.
|
inline |
Return the integer to character activity code-book.
|
inline |
Return the codebook of municipalities id (1 to 589) to their ins code.
|
inline |
Return the codebook of municipalities ins code to their id (1 to 589).
| vector< long int > Data::getMunAge | ( | int | municipality, |
| char | gender | ||
| ) |
Get the age's distribution of a municipality for a given gender.
| municipality | the INS code of a municipality |
| gender | the gender of an individual |
|
inline |
Return the road network.
| vector< long > Data::getNodesIdFromIns | ( | int | aIns | ) |
Return the list of node of a given municipality identified by its INS code.
| aIns | the INS code of the municipality of interest |
| long Data::getOneNodeIdFromIns | ( | int | aIns | ) |
Return one node of a given municipality identified by its INS code.
| aIns | the INS code of the municipality of interest |
| void Data::read_activity_cdb | ( | ) |
Read the activities' codebook.
| void Data::read_birth_age | ( | ) |
Read the birth probability by age and the probability to have a boy or a girl.
| void Data::read_death_age | ( | ) |
Read the death probability by age and gender.
| void Data::read_distribution_parameters_distance | ( | ) |
Read the distribution parameters for activities' distance.
| void Data::read_distribution_parameters_distance_x_duration_trip | ( | ) |
Read the distribution parameters for distance x duration of a trip.
| void Data::read_distribution_parameters_house_tdep | ( | ) |
Read the distribution parameters for activities' house time departure.
| void Data::read_distribution_parameters_start_duration | ( | ) |
Read the distribution parameters for activities' starting time x duration.
| void Data::read_indicators | ( | ) |
Read the various indicators used by the activity localization model.
| void Data::read_ins_id_mun | ( | ) |
Read the codebooks of ins code and municipality id (1 to 589).
| void Data::read_mun_age_men | ( | ) |
Read the age's distribution by municipality for the men.
| void Data::read_mun_age_women | ( | ) |
Read the age's distribution by municipality for the women.
| void Data::read_network | ( | ) |
Read the road network.
| void Data::read_node_ins | ( | ) |
Read the municipalities's node.
|
private |
distribution parameters for log(distance) x log(duration of the trip)
|
private |
birth's probability by women's age
|
private |
birth's probability to have a boy
|
private |
death's probability for a man by age
|
private |
death's probability for a woman by age
|
private |
size indicator of a municipality
|
private |
activities' code-book (from character to integer encoding)
|
private |
distribution parameters for activities' distance (log normal)
|
private |
activities' code-book (from integer to character encoding)
|
private |
distribution parameters for activities' log(starting time) x log(duration)
|
private |
distribution parameters for activities' house departure time (log normal)
|
private |
map of id of municipality (key) x ins code (value)
|
private |
map of ins code (key) x id of municipality (value)
|
private |
set of node by municipalities' ins code
|
private |
ins code of node
|
private |
men's age distribution by municipality
|
private |
women's age distribution by municipality
|
private |
road network
|
private |
properties of simulation