Abstract
We present a novel microsimulation approach which is enriched by elements from agent-based modeling. Concretely, we have designed a simulation model and software which facilitate describing and simulating life courses of individuals and couples and conducting mate matching. To define individual and couple behavior we use a continuous-time multi-state model, that is, we use a continuous-time microsimulation model. For mate matching we apply agent-based modeling: first, to each individual who is seeking for a partner a random value is assigned that captures his or her aspiration level regarding the fit with a potential partner. Then, via an empirical likelihood equation we assess the probability that a given woman and a given man would mate. Thereafter, we simulate a decision making process whether two individuals form a couple applying individual aspiration levels and their mating probability. Our description puts into perspective the differences between microsimulation and agent-based modeling, their relative strength, and limitations. We use the ml-DEVS formalism to specify the novel simulation approach and the modeling and simulation framework JAMES II to implement it. Projecting a hypothesized population based on the population of the Netherlands serves to illustrate its potential.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
This is opposed to continuous simulation (not to be confused with continuous time microsimulation) where system dynamics are continuously tracked.
- 2.
Specifically, the function C(T n ) maps the calendar time at T n and the function A(T n ) maps the age of an individual at T n . Similarly, A f(T n ) maps the age of a female spouse at T n and A m(T n ) maps the age of a male spouse at T n . At individual birth time the functions A(T n ), A f(T n ), and A m(T n ) take the value zero, and C(⋅ ) is zero at, for example, 01-01-1970 00:00:00.
- 3.
Examples are the German National Educational Panel Study NEPS (https://www.neps-data.de/en-us/home.aspx) and the German Family Panel pairfam (http://www.pairfam.de/en/study.html).
- 4.
Setting the length of the individual mating periods to two years at maximum is a compromise between minimizing the potential distortion of the microsimulation output and ensuring a feasible number of potential partners available within a certain time period.
- 5.
In order to avoid biased results, we do not assign to a male spouse a female spouse who has attributes identical to those of his observed spouse.
- 6.
By nature, the run times of such simulation settings are considerably longer than the run times of simulation settings that only implement sparse marriage markets. This is due to the fact that in sparse marriage markets many seekers might fail to encounter a potential partner. Thus, there is nobody to be screened and nothing to compute.
- 7.
JAMES II can be downloaded at http://www.jamesii.org and is distributed under the JAMESLIC which allows free reuse for commercial and noncommercial projects.
- 8.
We call the state transition of a model an internal event if it has not been provoked by an input message. Otherwise, the event is denoted as external event.
- 9.
Within a program, a thread is a sequentially executed stream of instructions.
- 10.
Note that the specification of the ml-DEVS population model and the newly designed sequential hierarchical simulator for ml-DEVS have already been described in a similar but more extended form in Zinn (2011).
- 11.
- 12.
MAPLES estimates age profiles from longitudinal survey data using a generalized additive model and piecewise cubic splines.
- 13.
Detailed data on EUROPOP 2008 mortality were kindly provided by Eurostat.
- 14.
- 15.
- 16.
- 17.
The generation of immigration events might rely on empirical data about immigration dates and number of immigrants or on hypothetical data.
- 18.
Modeling migration in this way allows us to extend the population model to study the migration behavior between different populations. For this purpose different population models would have to be coupled.
- 19.
For example, the root-coordinator might send information on emigrants to another coupled population model; see footnote 7.
References
Billari, F. C., Prskawetz, A., Aparicio Diaz, B., & Fent, T. (2008). The “wedding-ring”: An agent-based marriage model based on social interaction. Demographic Research, 17, 59–82.
Blossfeld, H.-P.(2009). Educational assortative marriage in comparative perspective. Annual Review of Sociology, 35, 513–530.
Buss, D. M. (2006). Strategies of human mating. Psychological Topics, 15(2), 239–260.
Cellier, F. E. (1991). Continuous system modeling. New York: Springer.
Chiappori, P. A., Oreffice, S., & Quintana-Domeque, C. (2010). Matching with a handicap: The case of smoking in the marriage market (IZA Discussion Paper No. 5392). Retrieved from http://ssrn.com/abstract=1731196
Clark, A. E., & Etilé, F. (2006). Don’t give up on me baby: Spousal correlation in smoking behaviour. Journal of Health Economics, 25(5), 958–978.
de Sousa Campos, L., Otta, E., & de Oliveira Siqueira, J. (2002). Sex differences in mate selection strategies: Content analyses and responses to personal advertisements in Brazil. Evolution and Human Behavior, 23(5), 395–406.
de Vos, S., & Palloni, A. (1989). Formal models and methods for the analysis of kinship and household organisation. Population Index, 55(2), 174–198.
Deming, W. E., & Stephan, F. F. (1940). On a least square adjustment of a sampled frequency table when the expected marginal totals are known. Annals of Mathematical Statistics, 11, 427–444.
Doll, R., Peto, R., Boreham, J., & Sutherland, I. (2004). Mortality in relation to smoking: 50 years’ observations on male British doctors. BMJ, 328(7455), 1519.
Galler, H. P. (1997). Discrete-time and continuous-time approaches to dynamic microsimulation (reconsidered) (Tech. Rep.). University of Canberra: NATSEM, National Center for Social and Economic Modelling, University of Canberra.
Gill, R., & Keilman, N. (1990). On the estimation of multidimensional demographic models with population registration data. Mathematical Population Studies, 2(2), 119–143.
Hill, R. A., & Dunbar, R. I. M. (2003). Social network size in humans. Human Nature, 14(1), 53–72.
Himmelspach, J., & Uhrmacher, A. M. (2006). Sequential processing of PDEVS models. In A. Bruzzone, A. Guasch, M. Piera, & J. Rozenblit (Eds.), Proceedings of the 3rd EMSS (pp. 239–244), Barcelona.
Hougaard, P. (1999). Multi-state models: A review. Lifetime Data Analysis, 5(3), 239–264.
Huinink, J., & Feldhaus, M. (2009). Family research from the life course perspective. International Sociology, 24(299), 299–324.
Impicciatore, R., & Billari, F. C. (2011). Maples: A general method for the estimation of age profiles from standard demographic surveys (with an application to fertility). Demographic Research, 24, 719–748.
Kalmijn, M. (1998). Intermarriage and homogamy: causes, patterns, trends. Annual Review of Sociology, 24, 395–421.
Mayer, K. U. (2009). New directions in life course research. Annual Review of Sociology, 35, 413–433.
Murphy, M. (2006). The role of assortative mating on population growth in contemporary developed societies. In F. C. Billari, T. Fent, A. Prskawetz, & J. Scheffran (Eds.), Agent-based computational modelling: Applications in demography, social, economic and environmental sciences (pp. 61–84). Heidelberg: Physica-Verlag.
Prentice, R., & Pyke, R. (1979). Logistic disease incidence models and case-control studies. Biometrika, 66(3), 403–411.
Rubinstein, R. Y., & Kroese, D. P. (2008). Simulation and the Monte Carlo method (2nd ed.). New York: Wiley.
Ruggles, S. (1993). Confession of a microsimulator: Problems in modeling the demographic kinship. Historical Methods, 26(4), 161–169.
Steiniger, A., Uhrmacher, A. M., Zinn, S., Gampe, J., & Willekens, F. (2014). The role of languages for modeling and simulating continuous-time multi-level models in demography. In A. Tolk, S. Diallo, I. Ryzhov, L. Yilmaz, S. Buckley, & J. Miller (Eds.), Proceedings of the 2014 Winter Simulation Conference, Savannah.
Todd, P., & Billari, F. C. (2003). Population-wide marriage patterns produced by individual mate-search heuristics. In F. C. Billari & A. Prskawetz (Eds.), Agent-based computational demography: Using simulation to improve our understanding of demographic behaviour (pp. 118–137). Heidelberg/New York: Physica-Verlag.
Todd, P., Billari, F. C., & Simão, J. (2005). Aggregate age-at-marriage patterns from individual mate-search heuristics. Demography, 42(3), 559–574.
Trivers, R. (1972). Sexual selection and the descent of man, 1871–1971. In B. Campbell (Ed.), Parental investment and sexual selection (pp. 136–179). Chicago: Aldine.
Uhrmacher, A. M., Ewald, R., John, M., Maus, C., Jeschke, M., & Biermann, S. (2007). Combining micro and macro-modeling in DEVS for computational biology. In Proceedings of the 2007 Winter Simulation Conference, Washington DC.
Uhrmacher, A. M., Himmelspach, J., & Ewald, R. (2010). Effective and efficient modeling and simulation with DEVS variants. In G. Wainer & P. Mosterman (Eds.), Discrete-event modeling and simulation: Theory and applications. Boca Raton: CRC/Taylor and Francis.
van Imhoff, E., & Post, W. (1998). Microsimulation methods for population projection. Population: An English Selection, New Methodological Approaches in Social Sciences, 10(1), 97–138.
Wainer, G., Morihama, L., & Passuello, V. (2002). Automatic verification of DEVS models. In Proceedings of the 2002 Spring Simulation Interoperability Workshop, San Diego.
Walker, L. (2010). Modelling inter-ethnic partnerships in New Zealand 1981–2006: A census-based approach. Ph.D. thesis, University of Auckland. Retrieved from https://researchspace.auckland.ac.nz/handle/2292/5823
Waynforth, D., & Dunbar, R. (1995). Conditional mate choice strategies in humans: Evidence from ‘lonely hearts’ advertisements. Behaviour, 132(9), 755–779.
Zeigler, B. P., Praehofer, H., & Kim, T. G. (2000). Theory of modelling and simulation (2nd ed.). New York: Academic Press. (Reissued by Krieger Pub. Co., Malabar, Fla. 1985.)
Zietsch, B., Verweij, K., Heath, A., & Martin, N. (2011). Variation in human mate choice: Simultaneously investigating heritability, parental influence, sexual imprinting, and assortative mating. The American Naturalist, 177(5), 605.
Zinn, S. (2011). A continuous-time microsimulation and first steps towards a multi-level approach in demography. Ph.D. thesis, University Rostock. Retrieved from http://rosdok.uni-rostock.de/file/rosdok_derivate_0000004766/Dissertation_Zinn_2011.pdf
Zinn, S. (2012). A mate-matching algorithm for continuous-time microsimulation models. International Journal of Microsimulation, 5(1), 31–51.
Zinn, S. (2015, January). Demographic microsimulation for individuals and couples (version 1). CoMSES Computational Model Library. Retrieved from https://www.openabm.org/model/4490/version/1
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Appendices
Appendices
A. The ml-DEVS Population Model
The ml-DEVS microsimulation model consists of a macro model Pop comprising two types of micro components: individual models I and couple models C, see Fig. 5.3. The special structure of the considered microsimulation model implies that not the entire functionality of the original ml-DEVS formalism is covered. For example, we do not employ any couplings between micro models. Therefore, for reasons of clarity, we adapt the original ml-DEVS approach such that in the subsequent description we leave out any functionalities that we do not demand.
A.1 The Population Macro Model
We formulate the population macro model Pop ⋆ as structure
where the input port comprises the following information
ψ i I describes the state of an immigrant (i = 1, ⋯ , n 1), and
ψ j C describes the state of an immigrating couple (j = 1, ⋯ , n 2),
Y is an output port for emigrants leaving the population,
S is the set of possible states of Pop, a state s = [s 1, ⋯ , s 5], s ∈ S, indicates
- s 1::
-
whether the transition of an individual model leads to a structural model change; indicators of structural model changes invoked by individual models are action Of Ind = { immigrating, emigrating, dying, childbirth},
- s 2::
-
whether the transition of a couple model leads to a structural model change; indicators of structural model changes invoked by couple models are action Of Couple = { immigrating, emigrating, d y i n g, c h i l d b i r t h, d i s s o l u t i o n, w i d o w h o o d},
- s 3::
-
the two individuals last found to form a proper match, and their mating time, otherwise \(s_{3} = \varnothing \),
- s 4::
-
all searching individuals that were included in the latest mate matching round and could not properly be matched, otherwise \(s_{4} = \varnothing \),
- s 5::
-
two individual models that are due to form a couple, otherwise \(s_{5} = \varnothing \).
\(s_{\mbox{ init}} = [\varnothing,\cdots \,, \varnothing ]\) is the initial state of Pop,
\(\delta: X \times S \times \mathcal{J} \times \mathcal{C}\rightarrow S\) is the state transition function of Pop, where \(\mathcal{J}\) is the index set of all individual models I and \(\mathcal{C}\) is the index set of all couple models C; δ is composed of four component functions:
- δ 1::
-
if individuals are immigrating, or an individual signalizes emigration, death, or a childbirth event, δ 1 updates the first component s 1 of the state of Pop accordingly, otherwise \(s_{1} = \varnothing \),
- δ 2::
-
if couples are immigrating, or a couple signalizes emigration, death, childbirth, dissolution, or a widowhood event, δ 2 updates the first component s 2 of the state of Pop accordingly, otherwise \(s_{2} = \varnothing \),
- δ 3::
-
if an individual model signalizes the onset of a partner search, then δ 3 executes a mate matching algorithm
-
if two individuals can be identified as forming a proper match, then δ 3 reports these two individuals and their corresponding mating time in s 3,
-
if no individuals can be identified as forming a proper match, δ 3 sets s 3 to \(\varnothing \);
-
besides this, δ 3 reports in s 4 all searching individuals who were inspected during the mate matching process and could not properly be matched;
otherwise \(s_{3} = s_{4} = \varnothing \),
-
- δ 4::
-
if two individuals signalize that their mating time is due, δ 4 reports this in s 5, otherwise \(s_{5} = \varnothing \).
\(\lambda _{ \mbox{ down}}: S \rightarrow 2^{\bigcup _{i\in \mathcal{J}}X_{i}}\) is the downward output function to inform individual models (via their input ports X i )
-
about upcoming mating times (reported by s 3), and
-
searching individuals, who were inspected during the latest mate matching round and for whom no proper match could be found (reported by s 4), about lowering their aspiration level;
λ: S → Y is the output function; it forwards the states and the birth dates of emigrating individuals and couples to Y.
s c: S → I ×C is the structural change function working on the set I of individual models and the set C of couple models; s c is composed of seven component functions:
- s c 1::
-
creates individual models:
if s 1 indicates immigrating individuals, s c 1 creates n 1 new individual models for immigrants,
if s 1 or s 2 indicate childbirth, s c 1 creates for each newborn an individual model,
- s c 2::
-
deletes an individual model:
if s 1 indicates that an individual is dying or emigrating, s c 2 deletes the corresponding individual model,
- s c 3::
-
creates couple models:
if s 2 indicates immigrating couples, s c 3 creates n 2 new couple models for immigrants,
- s c 4::
-
deletes a couple model:
if s 2 indicates that a couple is emigrating or both partners of a couple die, s c 4 deletes the corresponding couple model,
- s c 5::
-
creates a couple model and deletes two individual models:
if s 5 indicates a mating event, s c 5 creates a new couple model for the mating individuals and deletes the corresponding individual models,
- s c 6::
-
deletes a couple model:
if s 2 indicates the dissolution of a couple: s c 6 deletes the concerned couple model and creates for the separating partners two individual models,
- s c 7::
-
creates an individual model and deletes a couple model:
if s 2 indicates a widowhood event: s c 7 deletes the corresponding couple model and creates for the surviving partner an individual model; otherwise s c stays idle.
\(ta: S \rightarrow \mathbb{R}_{0}^{+} \cup \{\infty \}\) is the time-advanced function: t a(s) = 0 if at least one \(s_{i}\neq \varnothing \) (i = 1, ⋯ , 5), and t a(s) = ∞ otherwise.
The macro model Pop handles structural changes such as adding and removing individual and couple models. Via its input X the population model receives information about incoming immigrants.Footnote 17 Several immigrants may enter the population simultaneously, for example, family members or couples. Once Pop receives the information about immigration events, it creates as many individual and couple models as immigrate. In an analogous manner, Pop creates new individual models if individual or couple models report birth events. If individual or couple models indicate the occurrence of emigration events, Pop forwards their states and birth dates via its output port Y and removes the related models.Footnote 18 Besides migration, the macro model Pop guides the onset of partnerships, that is, the creation of couple models. To this end, Pop performs the mate matching algorithm described in Sect. 5.3. The mate matching procedure involves all individuals who signalize their disposition to mate, that is, exhibit a related output port. If two individuals are found to form a proper couple, Pop records this in its state and informs the individuals concerned immediately (t a(s) = 0) about the upcoming mating time (by carrying out λ down). These matched individuals receive the accordant information on their input port X i = { f o u n d M a t e}. Similarly, Pop instructs individuals who were unsuccessfully inspected during a mate matching round to lower their level of aspiration (via their input port X i = { r e d A s p L e v e l}). When two individual models signalize the due date of their partnership onset, Pop replaces them by a couple model. Accordingly, if a couple model informs Pop about a dissolution event, Pop replaces this couple model by two individual models describing the separated partners. Likewise, if a couple model signalizes a widowhood event, Pop replaces this couple model by one individual model that describes the surviving partner. Once Pop receives a message about a structural population change, it processes that information immediately (i.e., t a(s) = 0) and empties the output ports of the related micro models. Apart from immigration, Figs. 5.9 and 5.10 illustrate the different types of structural model changes that Pop carries out.
A.2 The Individual Micro Model
I is the set of all individual models I. We formulate I as structure
where
X is the input port of I; it is X = { f o u n d M a t e, r e d A s p L e v e l};
-
1.
Pop informs I via f o u n d M a t e about an upcoming partnership onset, and
-
2.
Pop instructs I via r e d A s p L e v e l to lower the aspiration level.
Y is the set of output ports of I; Y = { s e a r c h i n g, c h i l d b i r t h, e m i g r a t i o n, d e a t h, m a t i n g}; we differ between two types of output ports:
-
1.
the port s e a r c h i n g that is permanently exhibited when I is searching for a mate, and
-
2.
the output ports that indicate structural model changes:
-
(i)
if a childbirth event is due, I signalizes this on the port c h i l d b i r t h,
-
(ii)
if a death event is due, I signalizes this event on the port d e a t h,
-
(iii)
if an emigration event is due, I signalizes this on the port e m i g r a t i o n, and
-
(iv)
if a mating event is due, I signalizes this on the port m a t i n g.
-
(i)
\(^{I}\Psi \) is the set of possible states that I can occupy; \(^{I}\Psi \) comprises
-
(i)
I’s current state s c and I’s upcoming state s u (\(s_{c},s_{u} \in \Psi \) where \(\Psi \) is the state space of the stochastic process that maps the individual life course),
-
(ii)
I’s birth date b and I’s age a,
-
(iii)
the complete waiting time τ that I has to spend in s c as well as
-
(iv)
I’s aspiration level l a concerning a potential spouse (\(la = \varnothing \) indicates that I is not searching for a mate).
\(\psi _{0} = [s_{0},s_{0},b,a_{0},\infty, \varnothing ]\), comprises I’s initial state s 0, I’s birth date b, I’s age a 0 at model initialization, the entire waiting time that I has to spent in his/her current state (in the initialization phase we set this time to ∞), and the initial level of aspiration concerning a potential spouse is \(\varnothing \).
To facilitate the subsequent description of the ml-DEVS functions δ, p, λ and t a, we define the following auxiliary functions:
The function s e a r c h shows whether a transition (from state s c to state s u ) implies the onset of a partnership, the functions d e a t h and e m i g r a t i o n indicate a death and an emigration event (identified by inspecting s u ), and the function c h i l d b i r t h gives the number of newborns that an event implicates (identified by inspecting the transition from s c to s u ).
\(\delta: X \times ^{I}\Psi \rightarrow ^{I}\Psi \) is the state transition function of I (x indicates input messages and \(\psi \in ^{I}\Psi \)):
where s n is the next state of I and τ is the (random) waiting time between s c and s n , l a 0 is the aspiration level at the moment when an individual enters the mate-searching phase, and δ A is the decrement to lower the aspiration level in case of an unsuccessful search round.
\(p: ^{I}\Psi \rightarrow \mathcal{P}_{I}\) selects the output port available in a given state (with \(\mathcal{P}_{I} =\{ searching,mating,death,\) e m i g r a t i o n, c h i l d b i r t h} is the set of all possible output ports of I):
\(\lambda: ^{I}\Psi \rightarrow Y\) is the output function; it is composed by five component functions that fill the output ports s e a r c h i n g, m a t i n g, c h i l d b i r t h, d e a t h, and e m i g r a t i o n:
- λ 1::
-
If s e a r c h(s c , s u ) = t r u e and \(la\neq \varnothing \), λ 1 forwards the information (s u m, b, t des = b + a +τ ⋆, l a) necessary for mate searching, where s u m ⊆ s u comprises the individual attributes that are relevant for finding a proper spouse (like partnership type and age), and t des is the desired mating time; otherwise \(\lambda _{1} = \varnothing \).
- λ 2::
-
If I is due to mate (i.e., s e a r c h(s c , s u ) = t r u e and \(la = \varnothing \)), λ 2 forwards via the output port m a t i n g the upcoming state and the birth date of I, otherwise \(\lambda _{2} = \varnothing \).
- λ 3::
-
If I is due to give birth (i.e., c h i l d b i r t h(s c , s u ) > 0), λ 3 forwards via the output port c h i l d b i r t h the number of newborns, otherwise \(\lambda _{3} = \varnothing \).
- λ 4::
-
If I is due to die (i.e., d e a t h(s u ) = t r u e), λ 4 signalizes this to the output port d e a t h, otherwise \(\lambda _{4} = \varnothing \).
- λ 5::
-
If I is due to emigrate (i.e., e m i g r a t i o n(s u ) = t r u e), λ 5 forwards via the output port e m i g r a t i o n the current state and the birth date of I, otherwise \(\lambda _{5} = \varnothing \).
\(ta: ^{I}\Psi \rightarrow \mathbb{R}_{0}^{+} \cup \{\infty \}\) is the time-advanced function: t a(ψ) = τ.
The state of I captures all the information necessary to describe I’s attributes and behavior. It comprises I’s current state s c and I’s upcoming state S u as well as I’s birth date and age when entering state s c . Additionally, it contains the information about I’s aspiration l a concerning a potential spouse if I is in a mate-searching phase. The occurrence of an event (provoked by a state transition of the corresponding stochastic process) that does not imply the onset of a partnership results in an (ordinary) state transition of I. Therefore, I’s current state, upcoming state, and age at last transition is redefined accordingly. If the event implies the onset of a partnership, I immediately enters a phase of mate searching. In this phase, I features a positive aspiration level l a concerning the traits of a potential spouse and permanently exhibits his/her s e a r c h i n g output port. This port holds I’s birth date, the desired mating time, and the attributes of I that are relevant for the mate matching procedure, for example, whether I wants to marry or enter a cohabitation. The permanent exhibition of the s e a r c h i n g port ensures that every time Pop is conducting a mate matching round, it can retrieve those data that are relevant for mating. Meanwhile, every time Pop considers (the searching) I in a mate matching round and no proper spouse could be detected for I, Pop instructs I (via its input port r e d A s p L e v e l) to lower his/her aspiration level. During each mate matching round Pop checks whether I‘s desired mating time t des is expired. If this is the case, the options listed in Sect. 5.3.2 might be applied. For reasons of convenience, we opt for matching I with the most compatible opposite-sex candidate who is seeking for the same partnership type. If no such candidate is available, we shift the preferred mating time by half a year, and pair off I as soon as possible. If a proper spouse for I is then found, Pop informs I and the new spouse about the upcoming mating event. In line with this, I receives an accordant message on its input port f o u n d M a t e. Besides the s e a r c h i n g port, I possesses the four other output ports: d e a t h, e m i g r a t i o n, c h i l d b i r t h, and m a t i n g. The port d e a t h signalizes that I makes a transition to ‘death’. Likewise, e m i g r a t i o n shows an emigration event, and c h i l d b i r t h indicates the number of children that a transition implicates. On the m a t i n g port I signalizes that he/she enters a partnership. Figure 5.9 displays the output ports of I. It further illustrates the operations that Pop conducts in response.
A.3 The Individual Couple Model
C is the set of all couple models C. We formulate C as structure
where
Y is the output port of C; Y = { d i s s o l u t i o n, w i d o w h o o d, d e a t h, e m i g r a t i o n, c h i l d b i r t h}; it forwards structural changes such as dissolution (port: d i s s o l u t i o n), widowhood (port: w i d o w h o o d), death of both partners (port: d e a t h), emigration (port: e m i g r a t i o n), or childbirth (port: c h i l d b i r t h),
\(^{C}\Psi \) is the set of possible states that C can occupy; \(^{C}\Psi \) comprises
-
(i)
C’s current state s c and C’s upcoming state s u (\(s_{c},s_{u} \in \Psi \) with \(\Psi \) being the state space of the stochastic process that maps the dynamics of the couple),
-
(ii)
the birth date b m of the male spouse and the birth date b f of the female spouse
-
(iii)
the age a m of the male spouse and the age a f of the female spouse, as well as
-
(iv)
the complete waiting time τ that C has to spent in s c .
ψ 0 = [s 0, s 0, b m , b f , a m , a f , ∞], comprises C’s initial state s 0, the birth date b m of the male spouse, the birth date b f of the female spouse, the age a m of the male spouse at model initialization, and the age a f of the female spouse at model initialization, as well as C’s waiting time in s 0 to which we assign ∞ in the initialization phase.
To ease the subsequent description of the ml-DEVS functions δ, p, λ and t a, we define the following auxiliary functions:
The function d i s s o l u t i o n indicates whether a state transition implies the dissolution of the partnership, the function w i d o w h o o d indicates the death either of the male or the female spouse, and d e a t h O f B o t h shows the death of both partners; e m i g r a t i o n indicates an emigration event, and the function c h i l d b i r t h gives the number of newborns that a state transition implicates.
\(\delta: ^{C}\Psi \rightarrow ^{C}\Psi \) is the state transition function of C (with \(\psi \in ^{C}\Psi \)):
where s n is the next event of C and τ is the (random) waiting time between the states s u and s n .
\(p: ^{C}\Psi \rightarrow \mathcal{P}_{C}\) selects the port available in a given state of the couple model (with \(\mathcal{P}_{C} =\{ dissolution,widowhood,death,emigration,childbirth\}\) being the set of all possible output ports of C):
\(\lambda: ^{C}\Psi \rightarrow Y\) is the output function; it is composed of five component functions that fill the output ports d i s s o l u t i o n, w i d o w h o o d, c h i l d b i r t h, d e a t h and e m i g r a t i o n:
- λ 1::
-
If C is due to dissolve (i.e., d i s s o l u t i o n(s c , s u ) = t r u e), λ 1 forwards via the output port d i s s o l u t i o n the upcoming state of C and the birth dates of both spouses, otherwise \(\lambda _{1} = \varnothing \).
- λ 2::
-
If C is due to experience a widowhood event (i.e., w i d o w h o o d(s c , s u ) = t r u e), λ 2 forwards via the output port w i d o w h o o d the state and the birth date of the surviving partner, otherwise \(\lambda _{2} = \varnothing \).
- λ 3::
-
If C is due to experience a childbirth event (i.e., c h i l d b i r t h(s c , s u ) > 0), λ 3 forwards via the output port c h i l d b i r t h the number of newborns, otherwise \(\lambda _{3} = \varnothing \).
- λ 4::
-
If C is due to experience the death of both partners (i.e., d e a t h O f B o t h(s u ) = t r u e), λ 4 signalizes this to the output port d e a t h, otherwise \(\lambda _{4} = \varnothing \).
- λ 5::
-
If C is due to emigrate (i.e., e m i g r a t i o n(s u ) = t r u e), λ 5 forwards via the output port e m i g r a t i o n the current state of C and the birth dates of both spouses, otherwise \(\lambda _{5} = \varnothing \).
\(ta: ^{C}\Psi \rightarrow \mathbb{R}_{0}^{+} \cup \{\infty \}\) is the time-advanced function: t a(ψ) = τ.
The specification of the couple model C is very similar to the specification of the individual model I. It records in its state the attributes, the ages, and the birth dates of the female and the male spouse. Output ports are used to inform the macro model Pop about structural changes. State transitions are specified in the same way as in the case of I. To inform Pop about structural changes, the couple model C features five output ports (d i s s o l u t i o n, w i d o w h o o d, d e a t h, e m i g r a t i o n, and c h i l d b i r t h). If C experiences a dissolution event, it forwards via the port d i s s o l u t i o n to Pop the birth dates and the upcoming attributes of both spouses. In response, Pop creates for the separated partners two individual models, and deletes C. The processing in case of a widowhood event is similar. The only difference is that the individual model is created for the surviving partner only. If C experiences an emigration event, it forwards to Pop the current attributes and the birth dates of the female and the male spouse. In response Pop forwards C’s data via its output port and deletes C. Equally, the death of both spouses causes the deletion of C. In case of a childbirth event, C forwards the number of newborns to Pop. Pop reacts by creating as many individual models as newborns have been reported. Figure 5.10 shows the output ports of C. The figure further illustrates the structural model changes that Pop conducts in response to activated ports.
B. Sequential Abstract Simulator for ml-DEVS
The sequential abstract simulator for ml-DEVS executes parts of the DEVS processor tree en bloc. Therefore, it implements the two methods getOutputs and doRemainder. During simulation processing these methods are successively called. In doing so, it still complies with the original ml-DEVS communication protocol, compare Figs. 5.11 and 5.12.
Algorithm 1 Pseudocode of the coordinator of the sequential abstract simulator for the ml-DEVS population model
function Messages getOutputs()
for each microModel in imminents do
micro.msgs = union (micro.msgs, microModel.getOutputs())
if t is getTonie(macroModel)
macro.msgs = macroModel.lambda
macro.downMsgs = macroModel.lambdaDown
msgs = union (micro.msgs,macro.msgs,macro.downMsgs)
end if
return msgs
end function
function \(\big(\mathrm{double,\ ports}\big)\) doRemainder(msgs)
if t is getTonie(macroModel)
macro.downMsg = getMsgFromMacroLambda(msgs)
influencees = union (influencees, sendMessagesToMicroModels(macro.downMsgs))
else influencees is empty
end if
for each microModel in union (influencees, imminents) do
(microModel.Tonies, ports) = microModel.doRemainder()
macro.msgs = getMsgFromMacro(msgs)
micro.msgs = getMsgFromMicro(msgs)
msgs = union (micro.msgs,macro.msgs)
if (msgs is not empty) or t is getTonie(macroModel)
execute macroModel.stateTransition(msgs,ports)
execute macroModel.timeAdvance
macroModel.processStructuralChanges
ports = macroModel.availablePorts
end if
tonie = min(microModel.Tonies, getTonie(macroModel))
return union (tonie, ports)
end function
The simulator and coordinator of a ml-DEVS model realize the methods getOutputs and doRemainder differently, see Algorithms 1 and 2. If its getOutputs method is called, the macro model coordinator activates the simulator of all imminent micro models (i.e., all micro models for whom the next event is due). Subsequently, it reads their output messages. If the current model time t corresponds to the next event time of the macro model (i.e., to the coordinator’s actual t o n i e), the coordinator executes the output function of the macro model and its downward output function. Then, getOutputs forwards the output message of the macro model to the root-coordinator. The root-coordinator maintains that information for further processing.Footnote 19 Afterwards, the doRemainder method of the macro model coordinator is called. As a first step, it identifies all micro models who are influenced by an external event (i.e., by an upcoming partnership event or the instruction to lower the aspiration level) and feeds that information into their input ports. Then, if the current model time t equals the coordinator’s t o n i e, it executes all influenced micro models (via calling their doRemainder method). Thereafter, the coordinator executes all imminent models. For this purpose, it calls their doRemainder method. This method computes for all imminent models new next events–however, only if the models are not exposed to structural changes implying their extinction such as death or dissolution events. Then, the doRemainder method of the coordinator requests all (newly computed) next event times (t o n i es) as well as the currently exhibited ports of the micro models, and stores them. Subsequently, it checks whether it has received a message about an external event (i.e., about immigrants) or a messages about structural changes from its subordinate micro models. If so, or if its t o n i e is due, it executes the transition function and the time-advanced function of the macro model. Eventual reported structural model changes are subsequently executed. The doRemainder method exits by updating the available ports p o r t s of all subordinate micro models, and by determining and forwarding the system’s next event time. Note that the searching port of all individuals willing to mate is permanently exhibited by the related micro models. Only if an individual is paired off is it retracted.
Algorithm 2 Pseudocode of the simulator of the sequential abstract simulator for the ml-DEVS population model
function Messages getOutputs()
execute model.lambda
return getMsgs(model)
end function
function \(\big(\mathrm{double,\ ports}\big)\) doRemainder(msgs)
execute model.stateTransition(msgs)
execute model.timeAdvance
ports = model.availablePorts
return union (tonie, ports)
end function
The simulator of a micro model employs the method getOutputs to call the model’s output function and to forward the respective output information, for example, death or mating events. By doRemainder the simulator performs the state transition of the model and computes its next internal event determined by its own state transition function. Finally, it forwards to the coordinator of the macro model the ports exhibited in the current state of the model and its next event time. Opposed to a direct implementation of the ml-DEVS processing scheme, the sequential abstract simulator for ml-DEVS requires only two threads to execute a ml-DEVS model: one for the macro model coordinator and one for the root-coordinator. Hence, we are not in danger of facing any limitations concerning population size due to the restricted numbers of parallel threads supported by the Java virtual machine being used.
C. Transition Rates Used in the Application
In this appendix we present the age-profiles of the transition rates used in the application shown in Sect. 5.5. The transition rates that describe the propensity of unlinked females and males to change the marital status are depicted in Figs. 5.13 and 5.14. Transition rates of unlinked individuals to change their smoking behavior and (non-parity specific) fertility rates of females are also depicted in Fig. 5.14. Figure 5.15 shows the transition rates of spouses to change their smoking behavior. Figure 5.16 depicts the log-mortality rates of female and male non-smokers and smokers. The transition rates of couples to change marital status are given in Fig. 5.17.
Rights and permissions
Copyright information
© 2017 Springer International Publishing Switzerland
About this chapter
Cite this chapter
Zinn, S. (2017). Simulating Synthetic Life Courses of Individuals and Couples, and Mate Matching. In: Grow, A., Van Bavel, J. (eds) Agent-Based Modelling in Population Studies. The Springer Series on Demographic Methods and Population Analysis, vol 41. Springer, Cham. https://doi.org/10.1007/978-3-319-32283-4_5
Download citation
DOI: https://doi.org/10.1007/978-3-319-32283-4_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-32281-0
Online ISBN: 978-3-319-32283-4
eBook Packages: Social SciencesSocial Sciences (R0)