Population Generator¶
Using the generator¶
Command line interface¶
We provided the population generator with a command line interface (TCLAP). This interface contains a help flag which gives more information about the specific arguments. In order to display this help you must execute the following command:
./pop_generator -h
Input files¶
The population generator needs two files:
- The xml configuration
- A file with the configuration of families
An example of an xml configuration file can be found here: src/main/resources/templates/PopGenerator.xml
Meaning of the attributes in this file¶
Population::total: The total size of the population, the result may contain a small differencePopulation::provinces: The amount of provinces (currently has no effect in stride)Population.Random::generator: The RNG that is used, for a list of allowed random generators, see 1.Population.Random::seed: The seed of the random generatorPopulation.Family::file: The file containing the family configurationsPopulation.Cities.City::name: The name of a city, this city will be generatedPopulation.Cities.City::pop: The amount of people in this cityPopulation.Cities.City::lat: The latitude of the cityPopulation.Cities.City::lon: The longitude of the cityPopulation.Villages::radius: When calculating the position of a village, the generator first calulates the middle of the cities. Then it calculates the maximum distance between this middle and any city. The radius is then used as a factor to determine the maximum distance a village is located from the middle.Population.Villages.Village: This contains a template of a village. When a village is needed, the generator will pick a random templatePopulation.Villages.Village::min: The minimum size of the villagePopulation.Villages.Village::max: The maximum size of the villagePopulation.Villages.Village::fraction: The chance of this village template being chosen, all fractions must add up to onePopulation.Education.Mandatory: Contains the configuration for mandatory schoolsPopulation.Education.Mandatory::total_size: Size of an institutionPopulation.Education.Mandatory::cluster_size: Size of a group within a schoolPopulation.Education.Mandatory::radius: When a pupil is searching for a school, he looks for schools within this radius If he can’t find a school, the range is doubledPopulation.Education.Optional: It’s attributes and purpose are the same as Mandatory schoolsPopulation.Education.Optional.Far::fraction: Fraction of students that goes to a school that is further away from his homePopulation.Work::size: The size of a workplacePopulation.Work.Far::fraction: The fraction of working people that goes to workplaces that are located far away from their homesPopulation.Work.Far::radius: Analogue as the radius for schoolsPopulation.Community::size: The size of a communityPopulation.Community:: average_per_person: Currently not usedPopulation.Community::radius: Analogue as the radius for schoolsPopulation.School_work_profile.Mandatory::min: The minimum age for students on a mandatory schoolPopulation.School_work_profile.Mandatory::max: The maximum age for students on a mandatory schoolPopulation.School_work_profile.Employable::fraction: Fraction of people that is employed The others are either student on an optional school, or unemployedPopulation.School_work_profile.Employable.Young_employee::min: Minimum age for students at an optional schoolPopulation.School_work_profile.Employable.Young_employee::max: Maximum age for students at an optional schoolPopulation.School_work_profile.Employable.Young_employee::fraction: Fraction of people within the age range of students that have a jobPopulation.School_work_profile.Employable.Employee::min: Minimum age of a working personPopulation.School_work_profile.Employable.Employee::max: Maximum age of a working person
Family configuration file¶
This contains the possible configurations of each family (based on age). Every row is a family. The Population Generator randomly chooses configuration.
Random generators¶
The population generator uses the mt19937 random generator by default. Besides the mt19937 random generator, you can choose one of the following:
- default_random_engine
- mt19937_64
- minstd_rand0
- minstd_rand
- ranlux24_base
- ranlux48_base
- ranlux24
- ranlux48
- knuth_b
For more information about these generators please go to http://www.cplusplus.com/reference/random/.