# Batavian Demography and Army Recruitment version 2

No preview image

Model was written in NetLogo 6.0.4
•
Viewed 349 times
•
Downloaded 24 times
•
Run 0 times

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)

Info tab cannot be displayed because of an encoding error

## Comments and Questions

Please start the discussion about this model!
(You'll first need to log in.)

Click to Run Model

; Model name: BatavianDemographyRecruitment v4.nlogo ; Version: 4 (27 Nov 2018) ; Author: Philip Verhagen (VU University Amsterdam, Faculty of Humanities) ; This model is an appendix to the paper ; Verhagen, P. 2019. 'Modelling the dynamics of demography in the Dutch limes zone' in: Verhagen, P., J. Joyce & M.R. Groenhuijzen (eds) Finding the limits of the limes. Modelling economy, demography and transport on the edge of the Roman Empire'. Springer, New York. ; list of global variables ; [n-deaths] number of deaths per tick/year (an integer number) ; [f-deaths] number of adult female deaths per year (an integer number) ; [sum-age-at-death] the summed age of all humans who died (an integer number) ; [sum-n-children-at-death] the sum of the number of children per deceased adult female per year (an integer number) ; [sum-n-spouses-at-death] the sum of the number of spouses per deceased adult female per year (an integer number) ; [n-spinsters-at-death] the number of deceased adult females that never married in a year (an integer number) ; [sum-n-spinsters-at-death] the total number of deceased adult females that never married (an integer number) ; [n-children-per-female] the number of children per deceased adult female per year (an integer number) ; [n-spouses-per-female] the number of spouses per deceased adult female per year (an integer number) ; [sum-n-children-per-female] total number of children per deceased adult female over all runs (an integer number) ; [sum-n-spouses-per-female] total number of spouses per deceased adult female over all runs (an integer number) ; [n-born] the number of children born per year (an integer number) ; [disease-mortality] mortality multiplier because of disease (a floeating point number) ; [disease-recurrence] the return period of a disease (an integer number) ; [disease-year] determines whether the current year is a disease year (an integer number) ; [f-marriage-age] determines the minimum age of marriage for femalies (an integer number) ; [marriage-time-scale-factor] the compression of the time scale of first marriage, compared to Coale's (1971) standard scheme (a floating point number) ; [marriage-age-difference] determines the minimum allowed age difference between spouses (an integer number, positive numbers indicate that the male is older than the female) ; [fertility-rate-modifier] reduces the fertility rate (a floating point number) ; [stopping-behaviour] sets the maximum number of children to be born to a female (an integer number) ; [available-partners] sets the maximum number of males available for marriage globals [n-deaths f-deaths sum-age-at-death sum-marriage-age-at-death sum-n-children-at-death sum-n-spouses-at-death n-spinsters-at-death sum-n-spinsters-at-death n-children-per-female n-spouses-per-female sum-n-children-per-female sum-n-spouses-per-female n-born disease-year] ; list of agent-sets ; [humans] are agents representing a single human ; [households] are agents representing a single household, containing a certain number of humans breed [humans human] breed [households household] ; attributes for the agent-set 'humans': ; [age] records the age of each human in number of years (an integer number; = number of ticks) ; [is-dead] records if the human is dead or not (a binary number 0/1) ; [dying-age] sets the dying age of each human (an integer number) ; [gender] records the gender of each human (a string; options are "F" (female) or "M" (male)) ; [fertility] records the fertility rate of a female human (a floating point number between 0.0 and 1.0) ; [recruit] records the number of years that a recruited male human has served in the army (an integer number) ; [widowed] records whether the human is widowed (a binary number 0/1) ; [n-spouses] number of spouses (an integer number) ; [n-children] records the number of children born to a human (an integer number) ; [n-children-alive] records the number of children born and alive to a human (an integer number) ; [my-household] records the household of the human (a single agent from the agent-set households) ; [my-mother] records the mother of the human (a single agent) ; [my-father] records the father of the human (a single agent) ; [my-spouse] records the spouse of the human (a single agent; can be no-one) humans-own [age dying-age is-dead gender fertility recruit widowed n-spouses n-children n-children-alive my-household my-mother my-father my-spouse] ; attributes for the agent-set 'households': ; [household-members] records the agents who form part of the households (a number of agents from the agent-set humans) households-own [household-members] to setup ; setup creates a base set of 200 humans ; first, the ages of the humans are determined in the procedure 'to age-determination', and are taken from the life table chosen in the graphical interface ; (see 'to-report mortality' for details on the life tables) ; then, all females over [f-marriage-age] will be coupled to a spouse of the right age bracket (when available) and they will form a household ; humans who are not married will be distributed at random over the households; this is not a realistic assumption, but is done for quick model initialisation ; for the same reason, there are in this stage no widows and no recruits, and [n-children] equals 0 ca create-humans 200 [ ; determination of the biological sex of each human, with a 50% chance of them being either male of female ; ifelse random-float 1 < 0.5 ; [ set gender "M" ] ; [ set gender "F" ] ; adaptation to reflect 'natural sex ratio' of 105:100 M:F (see Bagnall & Frier 1994:95) ifelse random-float 1 < 0.5125 [ set gender "M" ] [ set gender "F" ] ; determination of the age of each human is done in the module age-determination age-determination ; the value of the variables [is-dead], [widowed], [n-spouses], [recruit], [n-children], [n-children-alive] and [my-household] are set to 0 set is-dead 0 set widowed 0 set n-spouses 0 set recruit 0 set n-children 0 set n-children-alive 0 set my-household 0 ] ; mother and father are assigned randomly; this is not important for the initialization ask humans [ set my-mother one-of humans with [gender = "F"] set my-father one-of humans with [gender = "M"] ] ask humans with [gender = "F" and age >= f-marriage-age] ; all females over [f-marriage-age] are coupled to a spouse, if available; there should be roughly between 35 and 55 females of this age in the initial sample ; this procedure should result in less households than the number of marriageable females, depending on [marriage-age-difference] [ ; a male is eligible as a husband when he is [marriage-age-difference] years older than the female, but no more than 15 years - this slightly offsets the couple ages from the rules applied later in the marriage module! let f-age age let husband one-of humans with [gender = "M" and my-spouse = 0 and age - f-age >= marriage-age-difference and age - f-age < 16] ; if a husband is found, he is coupled to the female, and vice versa if husband != nobody [ set my-spouse husband set n-spouses 1 ask husband [ set n-spouses 1 set my-spouse myself ] ; the couple (a temporary agent-set) then will 'hatch' a new household, which only consists of the couple itself let couple (turtle-set self husband) hatch-households 1 [ set household-members couple ask couple [ set my-household myself ] ] ] ] ask humans with [my-household = 0] ; those humans who could not be married are now added to a random household; this is not realistic, but serves for initialisation purposes [ ask one-of households [ set household-members (turtle-set household-members myself) ask myself [ set my-household myself] ] ] ; the global variables are now all initialized to 0 set n-deaths 0 set f-deaths 0 set sum-age-at-death 0 set sum-marriage-age-at-death 0 set sum-n-children-at-death 0 set sum-n-spouses-at-death 0 set n-spinsters-at-death 0 set sum-n-spinsters-at-death 0 set n-children-per-female 0 set n-spouses-per-female 0 set sum-n-children-per-female 0 set sum-n-spouses-per-female 0 set disease-year 1 reset-ticks end to go ; the model is run in four consecutive steps, executing the procedures 'to reproducing', 'to dying', 'to recruiting' and 'to marrying' ; each tick represents one year ; the order of execution implies that the steps are taken consecutively for the whole agentset of humans, so not for one human at a time ; 1 - it is determined which new humans will be hatched this year ; 2 - it is determined which humans will die this year ; 3 - it is determined which males in age 18-25 will be recruited for military service this year (making them unavailable as spouses) ; 4 - it is determined which females will marry this year reproducing dying recruiting marrying tick ; collect all necessary information for display at the end of each tick; collecting totals will only start at tick 100 if f-deaths > 0 [ set n-children-per-female sum-n-children-at-death / f-deaths set n-spouses-per-female sum-n-spouses-at-death / f-deaths if ticks > 99 [ set sum-n-children-per-female sum-n-children-per-female + n-children-per-female set sum-n-spouses-per-female sum-n-spouses-per-female + n-spouses-per-female set sum-n-spinsters-at-death sum-n-spinsters-at-death + n-spinsters-at-death ] ] ; the model will stop after 200 ticks/years if ticks = 201 [ print sum-n-children-per-female / 100 print sum-n-spouses-per-female / 100 print sum-n-spinsters-at-death / 100 stop ] ; reset all 'annual' global variables for the next tick set n-deaths 0 set f-deaths 0 set sum-age-at-death 0 set sum-n-children-at-death 0 set sum-n-spouses-at-death 0 set n-spinsters-at-death 0 ifelse disease-year = disease-recurrence [set disease-year 0 ] [set disease-year (disease-year + 1)] end to age-determination ; determine the age structure of the initial population ; for each human, an age is attributed according to the following rules: ; the probability of having an age in a 5-year cohort is determined on the basis ; of the life table selected at set up (see 'to-report mortality' for more details) ; the age within the 5-year cohort is then determined at random, so a human ; in the age cohort 25-29 years will have an equal (20%) chance of being either 25, 26, 27, 28 or 29 years old ask humans [ let a-number random-float 1 if Life_table = "West 3 Female"[ if a-number < 0.1472 [ set age 0 ] if a-number >= 0.1472 and a-number < 0.2900 [ set age random 4 + 1 ] if a-number >= 0.2900 and a-number < 0.4190 [ set age random 5 + 5 ] if a-number >= 0.4190 and a-number < 0.5319 [ set age random 5 + 10 ] if a-number >= 0.5319 and a-number < 0.6294 [ set age random 5 + 15 ] if a-number >= 0.6294 and a-number < 0.7124 [ set age random 5 + 20 ] if a-number >= 0.7124 and a-number < 0.7821 [ set age random 5 + 25 ] if a-number >= 0.7821 and a-number < 0.8396 [ set age random 5 + 30 ] if a-number >= 0.8396 and a-number < 0.8860 [ set age random 5 + 35 ] if a-number >= 0.8860 and a-number < 0.9226 [ set age random 5 + 40 ] if a-number >= 0.9226 and a-number < 0.9505 [ set age random 5 + 45 ] if a-number >= 0.9505 and a-number < 0.9707 [ set age random 5 + 50 ] if a-number >= 0.9707 and a-number < 0.9843 [ set age random 5 + 55 ] if a-number >= 0.9843 and a-number < 0.9926 [ set age random 5 + 60 ] if a-number >= 0.9926 and a-number < 0.9971 [ set age random 5 + 65 ] if a-number >= 0.9971 and a-number < 0.9991 [ set age random 5 + 70 ] if a-number >= 0.9991 and a-number < 0.9998 [ set age random 5 + 75 ] if a-number >= 0.9998 and a-number < 0.99998 [ set age random 5 + 80 ] if a-number >= 0.99998 [ set age random 10 + 85 ] ] if Life_table = "Pre-industrial Standard"[ if a-number < 0.1346 [ set age 0 ] if a-number >= 0.1346 and a-number < 0.2661 [ set age random 4 + 1 ] if a-number >= 0.2661 and a-number < 0.3867 [ set age random 5 + 5 ] if a-number >= 0.3867 and a-number < 0.4945 [ set age random 5 + 10 ] if a-number >= 0.3867 and a-number < 0.4945 [ set age random 5 + 15 ] if a-number >= 0.4945 and a-number < 0.5899 [ set age random 5 + 20 ] if a-number >= 0.5899 and a-number < 0.6732 [ set age random 5 + 25 ] if a-number >= 0.6732 and a-number < 0.7452 [ set age random 5 + 30 ] if a-number >= 0.7452 and a-number < 0.8063 [ set age random 5 + 35 ] if a-number >= 0.8063 and a-number < 0.8573 [ set age random 5 + 40 ] if a-number >= 0.8573 and a-number < 0.8988 [ set age random 5 + 45 ] if a-number >= 0.8988 and a-number < 0.9316 [ set age random 5 + 50 ] if a-number >= 0.9316 and a-number < 0.9565 [ set age random 5 + 55 ] if a-number >= 0.9565 and a-number < 0.9744 [ set age random 5 + 60 ] if a-number >= 0.9744 and a-number < 0.9864 [ set age random 5 + 65 ] if a-number >= 0.9864 and a-number < 0.9936 [ set age random 5 + 70 ] if a-number >= 0.9936 and a-number < 0.9991 [ set age random 5 + 75 ] if a-number >= 0.9991 and a-number < 0.9997 [ set age random 5 + 80 ] if a-number >= 0.9997 [ set age random 10 + 85 ] ] if Life_table = "Woods 2007 South 25"[ if a-number < 0.1547 [ set age 0 ] if a-number >= 0.1547 and a-number < 0.3046 [ set age random 4 + 1 ] if a-number >= 0.3046 and a-number < 0.4389 [ set age random 5 + 5 ] if a-number >= 0.4389 and a-number < 0.5547 [ set age random 5 + 10 ] if a-number >= 0.5547 and a-number < 0.6528 [ set age random 5 + 15 ] if a-number >= 0.6528 and a-number < 0.7345 [ set age random 5 + 20 ] if a-number >= 0.7345 and a-number < 0.8015 [ set age random 5 + 25 ] if a-number >= 0.8015 and a-number < 0.8557 [ set age random 5 + 30 ] if a-number >= 0.8557 and a-number < 0.8987 [ set age random 5 + 35 ] if a-number >= 0.8987 and a-number < 0.9320 [ set age random 5 + 40 ] if a-number >= 0.9320 and a-number < 0.9571 [ set age random 5 + 45 ] if a-number >= 0.9571 and a-number < 0.9750 [ set age random 5 + 50 ] if a-number >= 0.9750 and a-number < 0.9870 [ set age random 5 + 55 ] if a-number >= 0.9870 and a-number < 0.9943 [ set age random 5 + 60 ] if a-number >= 0.9943 and a-number < 0.9979 [ set age random 5 + 65 ] if a-number >= 0.9979 and a-number < 0.9994 [ set age random 5 + 70 ] if a-number >= 0.9994 and a-number < 0.9999 [ set age random 5 + 75 ] if a-number >= 0.9999 and a-number < 0.999996 [ set age random 5 + 80 ] if a-number >= 0.999996 [ set age random 10 + 85 ] ] if Life_table = "Egypt (Bagnall & Frier 1994)" and gender = "M" [ ; this is actually the same as Coale & Demeny's Model West Level 4 males if a-number < 0.32257 [ set age 0 ] if a-number >= 0.32257 and a-number < 0.45483 [ set age random 4 + 1 ] if a-number >= 0.45483 and a-number < 0.48268 [ set age random 5 + 5 ] if a-number >= 0.48268 and a-number < 0.50197 [ set age random 5 + 10 ] if a-number >= 0.50197 and a-number < 0.52696 [ set age random 5 + 15 ] if a-number >= 0.52696 and a-number < 0.56059 [ set age random 5 + 20 ] if a-number >= 0.56059 and a-number < 0.59553 [ set age random 5 + 25 ] if a-number >= 0.59553 and a-number < 0.63264 [ set age random 5 + 30 ] if a-number >= 0.63264 and a-number < 0.67198 [ set age random 5 + 35 ] if a-number >= 0.67198 and a-number < 0.71409 [ set age random 5 + 40 ] if a-number >= 0.71409 and a-number < 0.75627 [ set age random 5 + 45 ] if a-number >= 0.75627 and a-number < 0.80108 [ set age random 5 + 50 ] if a-number >= 0.80108 and a-number < 0.84489 [ set age random 5 + 55 ] if a-number >= 0.84489 and a-number < 0.88996 [ set age random 5 + 60 ] if a-number >= 0.88996 and a-number < 0.93081 [ set age random 5 + 65 ] if a-number >= 0.93081 and a-number < 0.96408 [ set age random 5 + 70 ] if a-number >= 0.96408 and a-number < 0.98649 [ set age random 5 + 75 ] if a-number >= 0.98649 and a-number < 0.99654 [ set age random 5 + 80 ] if a-number >= 0.99654 [ set age random 10 + 85 ] ] if Life_table = "Egypt (Bagnall & Frier 1994)" and gender = "F" [ ; this is actually Model West Level 2 females if a-number < 0.33399 [ set age 0 ] if a-number >= 0.33399 and a-number < 0.49224 [ set age random 4 + 1] if a-number >= 0.49224 and a-number < 0.52604 [ set age random 5 + 5 ] if a-number >= 0.52604 and a-number < 0.5507 [ set age random 5 + 10 ] if a-number >= 0.5507 and a-number < 0.58101 [ set age random 5 + 15 ] if a-number >= 0.58101 and a-number < 0.61614 [ set age random 5 + 20 ] if a-number >= 0.61614 and a-number < 0.6521 [ set age random 5 + 25 ] if a-number >= 0.6521 and a-number < 0.68883 [ set age random 5 + 30 ] if a-number >= 0.68883 and a-number < 0.72465 [ set age random 5 + 35 ] if a-number >= 0.72465 and a-number < 0.75832 [ set age random 5 + 40 ] if a-number >= 0.75832 and a-number < 0.78966 [ set age random 5 + 45 ] if a-number >= 0.78966 and a-number < 0.8244 [ set age random 5 + 50 ] if a-number >= 0.8244 and a-number < 0.86053 [ set age random 5 + 55 ] if a-number >= 0.86053 and a-number < 0.90113 [ set age random 5 + 60 ] if a-number >= 0.90113 and a-number < 0.93876 [ set age random 5 + 65 ] if a-number >= 0.93876 and a-number < 0.96884 [ set age random 5 + 70 ] if a-number >= 0.96884 and a-number < 0.9887 [ set age random 5 + 75 ] if a-number >= 0.9887 and a-number < 0.99724 [ set age random 5 + 80 ] if a-number >= 0.99724 [ set age random 10 + 85 ] ] ] end to reproducing ; procedure to determine if any females reproduce ; this depends on whether the female is married and on her age; fertility ratios are determined in the procedure 'to report fertility-rate' ; first, set the number of newborns for this year to 0 set n-born 0 ; determine the fertility rate of all females for this year fertility-rate ; then determine for each married female whether she will give birth ask humans with [gender = "F" and my-spouse != 0 and is-dead = 0] [ ; N.B. my-spouse is set to 0 when the spouse dies; the way the model is set up implies that spouses may die in the current year, but will still reproduce ; the fertility rate is a floating-point number between 0.0 and 1.0 determined in 'to-report fertility-rate', and is based on age and the true fertility estimates from Coale and Trussell (1978) ; for each married female, a random number will then determine whether she will become a mother ; the fertility rate modifier can be used to mimic the effect of lengthening the interval between births ; stopping behaviour prevents children from being born after a certain number of children have been born which have survived up to the current tick if random-float 1 < fertility * fertility-rate-modifier and n-children-alive <= stopping-behaviour [ let mother self let father my-spouse hatch-humans 1 ; the possibility of having twins is not incorporated, as it is not clear how this relates to the fertility estimates used; see notes in info-section for details [ ; hatched humans automatically inherit the attributes of their parents, so these should be adapted where necessary set age 0 set my-spouse 0 set fertility 0 set n-spouses 0 set n-children 0 set n-children-alive 0 set my-mother mother set my-father father if random-float 1 < 0.5125 ; the child's biological sex needs to be determined; since the child is produced by a female human, it will automatically be hatched with gender "F" [ set gender "M" ] ; add the newborn to the household of its parents; the child will automatically be hatched with my-household of the mother ask my-household [ set household-members (turtle-set household-members myself) ] ] ; update the count of newborns for this year set n-born n-born + 1 ; update the count of children of the mother set n-children n-children + 1 set n-children-alive n-children-alive + 1 ; update the count of children of the father (this feature is not used for output in the current version of the model) ask humans with [my-spouse = myself] [ set n-children n-children + 1 set n-children-alive n-children-alive + 1 ] ] ] end to dying ; procedure to determine which humans will die this year ; the risk of dying is determined on the basis of the model life table selected at setup ; the mortality regime can be adapted to catastrophic events by manipulating the [disease-mortality] and [disease-recurrence] in the interface; these could however also refer to other causes of increased mortality, such as famine or warfare ; statistics will be collected to determine the number of children left behind per adult female ask humans with [is-dead = 0] [ ; the risk of dying for each human is a floating-point number between 0.0 and 1.0 determined in 'to-report mortality', and is based on age and the life table chosen at setup let risk-of-dying mortality ; if the current year is a 'disease year', adapt the mortality rate if disease-year = disease-recurrence [ set risk-of-dying (mortality * disease-mortality) ] ; instead of setting the mortality and disease recurrency at equal levels over the whole of the model run, specific experiments could be carried out by adapting this piece of the code ; this is an example for an experiment trying to emulate the effects of the 'Antonine Plague' ; if ticks = 100 ; [ ; set risk-of-dying (mortality * 2.5) ; ] ; if ticks = 104 ; [ ; set risk-of-dying (mortality * 2.0) ; ] ; if ticks = 110 ; [ ; set risk-of-dying (mortality * 1.5) ; ] ; if ticks = 113 ; [ ; set risk-of-dying (mortality * 2.5) ; ] ; for each human, a random number will determine whether they will die ; the turtles will not really 'die', but [is-dead] will be set to 1 - the reason being that we need to collect data on the dead humans as well, and once they die in NetLogo they cannot be analysed anymore ; this obviously increases the number of agents, but it is easier than keeping track of everything through output to an external file if random-float 1 < risk-of-dying [ set n-deaths n-deaths + 1 ; increase the number of humans who died by 1 set sum-age-at-death sum-age-at-death + age ; get the sum of ages of humans who died if gender = "F" and age >= f-marriage-age [ set f-deaths f-deaths + 1 ; increase the number of adult females who died by 1 set sum-n-children-at-death sum-n-children-at-death + n-children ; get the sum of the number of offspring of adult females who died set sum-n-spouses-at-death sum-n-spouses-at-death + n-spouses ; get the sum of the number of spouses of adult females who died if n-spouses = 0 [set n-spinsters-at-death n-spinsters-at-death + 1] ; get the sum of the number of adult females who died without having married at least once ] ; the spouse, if applicable, will become widowed ask humans with [my-spouse = myself and is-dead = 0] [ set my-spouse 0 set widowed 1 ] ; reset the count for children alive in the family ask my-mother [ set n-children-alive n-children-alive - 1 ] ask my-father [ set n-children-alive n-children-alive - 1 ] set dying-age age set is-dead 1 ] ; for those humans who did not die, increase age by 1 year/tick set age age + 1 ] end to recruiting ; this procedures determines whether unmarried males between 18 and 25 years old will be recruited for army service ; this age is thought to be a realistic reflection of actual recruitment practices of the Roman army ; the recruitment rate is set using the slider at setup, and can vary between 0.0 and 0.2 per year (with steps of 0.01) ; recruited males are not available as spouses until they have finished their service term ; this assumption can be debated, but it is used here to understand the ; consequences of removing a certain proportion of males from the reproduction pool ; recruitment will start after stabilization of the model at ticks = 100 if ticks > 100 [ ask humans with [gender = "M" and age > 17 and age < 26 and my-spouse = 0 and is-dead = 0] ; for each unmarried male between 18 and 25 years old, a random number will determine whether he will be recruited [ if random-float 1 < recruitment [ set recruit 1 ] ] ; for every year served, the value of [recruit] will be increased by 1 ; after serving a 25-years term in the army, the male will be added to the reproduction pool, and will be available for marriage again ; these parameters could be adapted if necessary ask humans with [recruit > 0 and is-dead = 0] [ set recruit recruit + 1 if recruit > 25 [ set recruit 0 ] ] ] end to marrying ; this procedure will try to get unmarried females married; they will start a new household if necessary ; a number of scenarios for marriage strategies can be explored here ; the minimum female marriage age [f-marriage-age] can be set in the interface ask humans with [gender = "F" and age >= f-marriage-age and my-spouse = 0 and is-dead = 0] [ ; determine marriage-probability for each female selected ; scenario 1: work with marriage probabilities for first marriage ; marriage probabilities are calculated according to Coale (1971) ; for this model, the variables to be included are a0 (= f-marriage-age) and k (= marriage-time-scale-factor) let k marriage-time-scale-factor let marriage-probability ((0.174 / k) * exp(-4.411 * exp((-0.309 / k) * (age - f-marriage-age)))) ; scenario 2: work without marriage probabilities ; let marriage-probability 1 ; check if remarriage of females is allowed or not, and adapt marriage-probability accordingly if allow_remarriage = false and n-spouses > 0 [ set marriage-probability 0 ] if allow_remarriage = true and n-spouses > 0 [ set marriage-probability 1 ] let f-age age let husband nobody if (n-spouses = 0) and (random-float 1 < marriage-probability) ; find a suitable husband ; any unmarried adult male is a potential partner; this includes widowers and soldiers returning from army service; N.B. this differs from the setup conditions ; in the interface, the minimum age difference [marriage-age-difference] can be set if desired [set husband one-of humans with [gender = "M" and (age - f-age) >= marriage-age-difference and my-spouse = 0 and recruit = 0 and is-dead = 0]] ; when a suitable husband is found, determine if a new household should be started if husband != nobody [ set my-spouse husband set n-spouses n-spouses + 1 set widowed 0 let couple (turtle-set self husband) ; if the male is widowed, then the female will be added to his household ; else the couple will start a new household ; in this model, this feature is not used for any particular purpose, but it serves to keep the number of agents as low as possible ask husband [ set n-spouses n-spouses + 1 set my-spouse myself ifelse widowed = 0 [ hatch-households 1 [ set household-members couple ask couple [ set my-household myself ] ] ] [ ask my-household [ set household-members (turtle-set household-members self) ] set widowed 0 ] ] ] ] end to-report mortality ; in this procedure, the mortality rate (risk of dying) of each human is determined; it is based on one the three life tables from which the user can choose at setup; these are: ; Coale and Demeny's (1966) Model West Level 3 Female ; Wood's (2007) South High Mortality with e0=25, and ; and Séguy and Buchet's (2013) Pre-Industrial Standard table ; N.B. the first two are adapted versions taken from Hin (2013)! ; the life tables used here represent mortality rates per 5-year cohort, so mortality will only change when the human has lived for another 5 years (passes into the next cohort) ; this could be a little bit more sophisticated (see e.g. Danielisová et al. 2015) let mortality-5year 0 if Life_table = "West 3 Female" [ if age = 0 [set mortality-5year 0.3056] if age > 0 and age <= 4 [set mortality-5year 0.2158 / 4] if age > 4 and age <= 9 [set mortality-5year 0.0606 / 5] if age > 9 and age <= 14 [set mortality-5year 0.0474 / 5] if age > 14 and age <= 19 [set mortality-5year 0.0615 / 5] if age > 19 and age <= 24 [set mortality-5year 0.0766 / 5] if age > 24 and age <= 29 [set mortality-5year 0.0857 / 5] if age > 29 and age <= 34 [set mortality-5year 0.0965 / 5] if age > 34 and age <= 39 [set mortality-5year 0.1054 / 5] if age > 39 and age <= 44 [set mortality-5year 0.1123 / 5] if age > 44 and age <= 49 [set mortality-5year 0.1197 / 5] if age > 49 and age <= 54 [set mortality-5year 0.1529 / 5] if age > 54 and age <= 59 [set mortality-5year 0.1912 / 5] if age > 59 and age <= 64 [set mortality-5year 0.2715 / 5] if age > 64 and age <= 69 [set mortality-5year 0.3484 / 5] if age > 69 and age <= 74 [set mortality-5year 0.4713 / 5] if age > 74 and age <= 79 [set mortality-5year 0.6081 / 5] if age > 79 and age <= 84 [set mortality-5year 0.7349 / 5] if age > 84 and age <= 89 [set mortality-5year 0.8650 / 5] if age > 89 and age <= 94 [set mortality-5year 0.9513 / 5] if age > 94 [set mortality-5year 1.000 / 5] ] if Life_table = "Pre-Industrial Standard" [ if age = 0 [set mortality-5year 0.200] if age > 0 and age <= 4 [set mortality-5year 0.150 / 4] if age > 4 and age <= 9 [set mortality-5year 0.052 / 5] if age > 9 and age <= 14 [set mortality-5year 0.029 / 5] if age > 14 and age <= 19 [set mortality-5year 0.038 / 5] if age > 19 and age <= 24 [set mortality-5year 0.049 / 5] if age > 24 and age <= 29 [set mortality-5year 0.054 / 5] if age > 29 and age <= 34 [set mortality-5year 0.060 / 5] if age > 34 and age <= 39 [set mortality-5year 0.068 / 5] if age > 39 and age <= 44 [set mortality-5year 0.079 / 5] if age > 44 and age <= 49 [set mortality-5year 0.093 / 5] if age > 49 and age <= 54 [set mortality-5year 0.115 / 5] if age > 54 and age <= 59 [set mortality-5year 0.152 / 5] if age > 59 and age <= 64 [set mortality-5year 0.202 / 5] if age > 64 and age <= 69 [set mortality-5year 0.275 / 5] if age > 69 and age <= 74 [set mortality-5year 0.381 / 5] if age > 74 and age <= 79 [set mortality-5year 0.492 / 5] if age > 79 and age <= 84 [set mortality-5year 0.657 / 5] if age > 84 [set mortality-5year 1.00 / 5] ] if Life_table = "Woods 2007 South 25"[ if age = 0 [set mortality-5year 0.2900] if age > 0 and age <= 4 [set mortality-5year 0.1900 / 4] if age > 4 and age <= 9 [set mortality-5year 0.0546 / 5] if age > 9 and age <= 14 [set mortality-5year 0.0429 / 5] if age > 14 and age <= 19 [set mortality-5year 0.0707 / 5] if age > 19 and age <= 24 [set mortality-5year 0.1065 / 5] if age > 24 and age <= 29 [set mortality-5year 0.1234 / 5] if age > 29 and age <= 34 [set mortality-5year 0.1301 / 5] if age > 34 and age <= 39 [set mortality-5year 0.1366 / 5] if age > 39 and age <= 44 [set mortality-5year 0.1392 / 5] if age > 44 and age <= 49 [set mortality-5year 0.1490 / 5] if age > 49 and age <= 54 [set mortality-5year 0.1655 / 5] if age > 54 and age <= 59 [set mortality-5year 0.1857 / 5] if age > 59 and age <= 64 [set mortality-5year 0.2613 / 5] if age > 64 and age <= 69 [set mortality-5year 0.3853 / 5] if age > 69 and age <= 74 [set mortality-5year 0.5288 / 5] if age > 74 and age <= 79 [set mortality-5year 0.6403 / 5] if age > 79 and age <= 84 [set mortality-5year 0.7431 / 5] if age > 84 [set mortality-5year 1.00 / 5] ] if Life_table = "Egypt (Bagnall & Frier 1994)" and gender = "M"[ if age = 0 [set mortality-5year 0.32257] if age > 0 and age <= 4 [set mortality-5year 0.19523 / 4] if age > 4 and age <= 9 [set mortality-5year 0.05141 / 5] if age > 9 and age <= 14 [set mortality-5year 0.03697 / 5] if age > 14 and age <= 19 [set mortality-5year 0.05017 / 5] if age > 19 and age <= 24 [set mortality-5year 0.07110 / 5] if age > 24 and age <= 29 [set mortality-5year 0.07951 / 5] if age > 29 and age <= 34 [set mortality-5year 0.09175 / 5] if age > 34 and age <= 39 [set mortality-5year 0.10709 / 5] if age > 39 and age <= 44 [set mortality-5year 0.12838 / 5] if age > 44 and age <= 49 [set mortality-5year 0.14754 / 5] if age > 49 and age <= 54 [set mortality-5year 0.18383 / 5] if age > 54 and age <= 59 [set mortality-5year 0.22024 / 5] if age > 59 and age <= 64 [set mortality-5year 0.29059 / 5] if age > 64 and age <= 69 [set mortality-5year 0.37125 / 5] if age > 69 and age <= 74 [set mortality-5year 0.48085 / 5] if age > 74 and age <= 79 [set mortality-5year 0.62398 / 5] if age > 79 and age <= 84 [set mortality-5year 0.74408 / 5] if age > 84 and age <= 89 [set mortality-5year 0.82924 / 5] if age > 89 and age <= 94 [set mortality-5year 0.95201 / 5] if age > 94 [set mortality-5year 1.00 / 5] ] if Life_table = "Egypt (Bagnall & Frier 1994)" and gender = "F"[ if age = 0 [set mortality-5year 0.33399] if age > 0 and age <= 4 [set mortality-5year 0.23760 / 4] if age > 4 and age <= 9 [set mortality-5year 0.06657 / 5] if age > 9 and age <= 14 [set mortality-5year 0.05205 / 5] if age > 14 and age <= 19 [set mortality-5year 0.06744 / 5] if age > 19 and age <= 24 [set mortality-5year 0.08385 / 5] if age > 24 and age <= 29 [set mortality-5year 0.09369 / 5] if age > 29 and age <= 34 [set mortality-5year 0.10558 / 5] if age > 34 and age <= 39 [set mortality-5year 0.11511 / 5] if age > 39 and age <= 44 [set mortality-5year 0.12227 / 5] if age > 44 and age <= 49 [set mortality-5year 0.12967 / 5] if age > 49 and age <= 54 [set mortality-5year 0.16518 / 5] if age > 54 and age <= 59 [set mortality-5year 0.20571 / 5] if age > 59 and age <= 64 [set mortality-5year 0.29144 / 5] if age > 64 and age <= 69 [set mortality-5year 0.37118 / 5] if age > 69 and age <= 74 [set mortality-5year 0.49858 / 5] if age > 74 and age <= 79 [set mortality-5year 0.6372 / 5] if age > 79 and age <= 84 [set mortality-5year 0.75601 / 5] if age > 84 and age <= 89 [set mortality-5year 0.87919 / 5] if age > 89 and age <= 94 [set mortality-5year 0.95785 / 5] if age > 94 [set mortality-5year 1.00 / 5] ] report mortality-5year end to fertility-rate ; in this procedure, the fertility rate (probability of reproducing) of each female is determined, based on the figures given in Coale & Trussell (1978) derived from Henry's (1961) 'natural fertility rate' ; the Total Fertility Rate (TFR) resulting from this scheme is 11.05 ; note that fertility will be determined once a female has reached age 15; however, in this model reproduction is not allowed until the female is married ; the second schedule (greyed out in this version) is based on Bagnall & Frier's (1994) Egypt data (TFR 6.27); this already takes into account nuptiality and possible contraceptive measures ; the figures used here represent fertility rates per 5-year cohort, so fertility will only change when the female has lived for another 5 years (passes into the next cohort) ; a more realistic approach would take into account the time that has passed since the previous birth ; however, this would make the model much slower, since we would then have to use time steps of one month ask humans with [gender = "F"] [ if age < 15 [ set fertility 0.000 ; set fertility 0.0259 ] if age > 14 and age <= 19 [ set fertility 0.411 ; set fertility 0.1596 ] if age > 19 and age <= 24 [ set fertility 0.46 ; set fertility 0.2311 ] if age > 24 and age <= 29 [ set fertility 0.431 ; set fertility 0.2776 ] if age > 29 and age <= 34 [ set fertility 0.395 ; set fertility 0.2129 ] if age > 34 and age <= 39 [ set fertility 0.322 ; set fertility 0.1633 ] if age > 39 and age <= 44 [ set fertility 0.167 ; set fertility 0.1300 ] if age > 45 and age <= 49 [ set fertility 0.024 ; set fertility 0.0631 ] if age > 49 [ set fertility 0.000 ] ] end

There are 2 versions of this model.

## Attached files

No files

**Parent:** Batavian Demography and Army Recruitment

This model does not have any descendants.