<<

Appendix A Modeling Techniques

A.1 Growth Models Using Differential Equations

Our main goal here is to introduce a few modeling techniques we use throughout this book. We do not intend however to provide here the fundamentals on modeling, a tutorial or a review. For these, we refer to other sources (DeAngelis et al. 1992; Ford 2009; Grimm et al. 2006; Kuang 1993). This Appendix is rather a refresher as well as an example of why using different modeling techniques for one and the same problem can be beneficial to understand biological processes better. We start with the simple exponential to make modeling accessible even to complete beginners. Biologists generally define a population as a collection of individuals that belong to the same species and can potentially breed with each other. One of the best-known early models on population growth was outlined by Malthus (1798). He famously maintained that the human population is predicted to grow in an exponential manner, but the crucial products needed to sustain the population grow in but a linear manner. He argued that these different types of growths will trigger disasters when the population’s needs are not satisfied. The basic exponential growth model consists of a single positive feedback loop that arises from the fact that every individual (N) is predicted to have a fixed number of offspring (r), regardless of the size of the population, and thus also regardless of the remaining resources in the : dN = rN dt (A.1.1)

This exponential growth model had a profound effect on biology such as developing the theory of natural selection (Darwin 1859). Exponential population growth is physically not possible in the long run, because either the resources needed to sustain the growth run out (e.g., space, nutrients, access to light, etc.) or due to density-dependent factors, such as the rate of individuals’ access to food,

© Springer Nature Switzerland AG 2020 149 I. Karsai et al., Resilience and Stability of Ecological and Social Systems, https://doi.org/10.1007/978-3-030-54560-4 150 A Modeling Techniques the dependence of infection on population density, or the density dependence of fertility rates. These will have an increasing effect as the population grows in size. In real thus also a negative feedback loop is found within the system that counteracts the positive feedback loop which drives exponential growth. The population usually avoids catastrophe via moderating its own growth as the population increases and the interplay of these two feedback loops also makes the population resilient against perturbations. This general pattern has been observed also in chemistry and it was described by the Belgian mathematician Verhulst (1845) as the density-dependent dynamics of chemical reactions, which led to the best- known early : dN  N  = rN − dt 1 K (A.1.2)

The beauty of this simple equation is that the actual reproduction rate scales linearly between a maximum value (r) and minimum value of zero—or, if a population becomes by some force larger than its habitat’s (K), it can even have negative values leading to a decline of the population. No reproduction happens any more when the population reaches its carrying capacity (N = K). This is a simple equation that can be solved formally to predict at any time in a closed form, if the maximum reproductive rate (r), carrying capacity (K), and the initial population size (N0) are given: KN ert N(t) = 0 rt (A.1.3) K + N0(e − 1)

Many models in biology have further complexities such as time delays or a large number of other parameters, therefore the actual model equations often cannot be solved formally. In such cases, we can still perform numerical simulations which, with some caveat, will give us still useful predictions and insights into the properties of the system. Many programming languages and modeling platforms have built-in equation solvers. One of the best-known examples for numerical simulations was developed by the school of “System Dynamics” (Forrester 1968) which led to simulation tools like Stella or Vensim (Eberlein and Peterson 1992). The advantage of the systems dynamics approach is that it combines visual sketches that demonstrate the causal relations between the system’s components with the mathematical functions needed to solve models (Fig. A.2). Vensim requires the user to clearly establish the logical connections of the model (by doing sketching). The complicated differential equations are dissected into inflows and outflows, which make debugging easier and only require elemental algebra to plug in the rates. A Vensim system can show results in tables or figures (Fig. A.1). A Modeling Techniques 151

Fig. A.1 Predicted population size per unit area (acres, using the scale given) for a plant growing as the Verhulst equation describes it in Vensim. Parameters: N0 = 10, r = 0.8andK = 1000

Fig. A.2 Vensim model of sigmoid growth as in the Verhulst equation. The box called “stock” where the quantities (in this case the individuals belonging to the population) are stored. This stock integrates the flows (double arrow). This model has one inflow term called “growth” which funnel the individuals from the source (small cloud) to the stock. This flow contains a rate equation which have 3 inputs and is expressed as an algebraic term: rN(K − N/K)

A.2 Agent-Based Models of Population Growth

Without analyzing the sigmoid growth model and its biological importance in details, we also need to mention that the cited assumptions of r and K are biologically quite unrealistic. They are not constants and they actually summarize several other important life history parameters. Generally, the two most common ways to resolve these problems are either to include more parameters and variables into the model (as we did in Chap. 2) or using an altogether different model design, where these parameters are actually missing in the specification of the model but will emerge in runtime. 152 A Modeling Techniques

Fig. A.3 Starting configuration of an agent-based Netlogo model. Trees and animals have their own rule sets and several parameters of the model are actually variables and their values are different for each individual. Agents can move and interact with each other and with the environment while updating key variables such as energy level. This energy level in turn, affects the agents’ behavior (die of hunger, breed and so on)

Models using aggregated parameters and equations have a top-down design. A different, bottom-up design for modeling populating growth would be to use cybernetic models (urn or cellular automata models, agent-based i.e., individual- based models) such as implemented in Netlogo (Wilensky 1999). For example, in an agent-based model for population growth, each agent has an energy level which is a state of the current energy budget calculated from spending and gaining energy tokens by the behavior of that individual. Movement and reproduction cost energy, while feeding gains energy. In this approach, reproduction rate will not be a constant parameter, but depend, as a simple emergent property, on this energy dynamics. The same is true for carrying capacity: It is not programmed directly into the system, but will depend on factors such as how quickly the agents find food, how much they can exploit food that is present, and how the food regenerates. We show in details such energy-based ecological microcosms (Chaps. 2 and 3), but the main idea for these agent- or individual-based models is to simulate population growth where the aggregate (biologically unrealistic) parameters are replaced by a simple life history (i.e., a mechanism) with dynamic elements. The agent-based models can also predict a sigmoid growth without directly implementing r and K (Fig. A.3). Rather, K and r will be emergent properties of the system (Figs. A.4 and A.5). While the above two modeling approaches have very different structures, assumptions, and presentations, their predictions are very close. (The agent-based model can be downloaded1). To summarize, in this book we wanted to emphasize that different modeling approaches of the same problems can give the same but also different insights and understandings. It is important to have different perspectives. Practical questions also play an important role. For example, agent-based models can run for a long

1https://sites.google.com/site/springerbook2020/chapter-4. A Modeling Techniques 153 1800 Individuals

Na = 100 Na = 200 Na = 400 Na = 800 Na = 1600 0 200 400 600 800 1000 1400

020406080100 Years

Fig. A.4 Sigmoid population growth predicted by the agent-based model without using the Verhulst equation and the parameters r and K. Left panel: a single run as shown on the modeling platform; Right panel: processed data: average value of 20 runs of the animal population at different starting values (N0). Reprinted from Karsai et al. (2016) with permission from Elsevier

A B Individuals Reproduction rate

Na = 100 Na = 200 Na = 400 Na = 800 Na = 1600 0 200 400 600 800 1000 1200 1400 1600 0.0 0.1 0.2 0.3 0.4 0.5

51015200 20 40 60 80 100

Ye a r s Years

Fig. A.5 Estimated population parameters from the agent-based model (numbers are calculated from the result data and was not part of the model itself); (A) Change of reproductive rate of animals; (B) emergent stable population size (K) of the animals at different starting conditions. Reprinted from Karsai et al. (2016) with permission from Elsevier time and needed to have multiple runs and statistical evaluations. This may not be very practical for the cases when quick results are needed. In this case, aggregate models will provide a much faster prediction. On the other hand, agent-based models explore generally a larger state space and provide more variable predictions. 154 A Modeling Techniques

References

Darwin CR (1859) On the origin of species by means of natural selection, or the preservation of favoured races in the struggle for life. John Murray, London DeAngelis DL, Gross LJ, Boston MA (1992) Individual-based models and approaches in . Chapman and Hall, New York Eberlein RL, Peterson DW (1992) Understanding models with Vensim™. Eur J Oper Res 59:216–219 Forrester JW (1968) Principles of systems, 2nd edn. Pegasus Communications, Waltham Ford A (2009) Modeling the environment. Island Press, Washington Grimm V, Berger U, Bastiansen F, Eliassen S, Ginot V, Giske J, Goss-Custard J, Grand T, Heinz S, Huse G, Huth A, Jepsen JU, Jørgensen C, Mooij WM, Müller B, Pe’er G, Piou C, Railsback SF, Robbins AM, Robbins MM, Rossmanith E, Rüger N, Strand E, Souissi S, Stillman RA, Vabø R, Visser U, DeAngelis DL (2006) A standard protocol for describing individual-based and agent-based models. Ecol Model 198:115–126 Karsai I, Roland B, Kampis G (2016) The effect of fire on an abstract forest : an agent based study. Ecol Complexity 28:12–23. https://doi.org/10.1016/j.ecocom.2016.09.001 Kuang Y (1993) Delay differential equations: with applications in . Academic Press, Boston Malthus TR (1798) An essay on the principle of population as it affects the future improvement of society with remarks on the speculations of Mr. Godwin, M. Condorcet, and other writers. J Johnson in St. Paul’s Churchyard, London Verhulst PF (1845) Recherches mathématiques sur la loi d’accroissement de la population. Nouveaux Memoires de l’Academie Royale des Sciences et Belles- Lettres de Bruxelles 18: 1–41. Wilensky U (1999) NetLogo. Center for connected learning and computer based modeling. Northwestern University, Evanston Index

A D Adaptation, 5–7, 11, 64, 67, 82, 86, 92, Density, 13, 14, 20, 21, 27, 30, 64, 74, 109, 126 110, 127, 148 , 24, 27 Density dependence, 20–22, 24, 51, 149, 150 Ants, 80–121, 127, 144 Density-dependent, 20–22, 24, 51, 149, 150 Asexual, 20, 51 Density-independent, 20–27, 30–32 Differential equations B delayed, 91 Bio-inspiration, 14, 15 partial, 3 loss, 9, 11 Distribution exponential, 65, 72 lognormal, 72 C random uniform, 113 Cellular automata, 28, 65, 152 Division of labor, 8, 80, 108, 110, 115, 144 Circuits Dynamics electrical, 136, 137 nonlinear, 91 RLC, 138, 139 Climate change, v, 4, 10, 79 Collective information processing, 91 Colony, vi, 9, 14, 80–86, 88, 91, 92, 95, E 97–105, 107–120, 127, 129–132, Ecosystem, 1–15, 27, 29, 32, 39, 64, 65, 71, 135–137, 141, 143, 144 75 Common stomach, 14, 82–84, 86–91, 93–97, Ectatomma ruidum, 109–114 99–104, 107–121, 125–145 Emergent, 2, 3, 28, 32, 33, 37, 51, 69, 80, 86, 88, 152, 153 coefficient, 29, 32, 37, 42 Emergent properties, 2, 3, 28, 32, 33, 37, 69, interspecific, 13, 21, 27–30, 32 79, 80, 86, 152 intraspecific, 7, 8, 13, 32, 41 Empirical function, vi, 136 male, 20 Equilibrium, 3, 5–8, 19, 23, 31, 32, 90, 94, 96, Conservation biology, 49, 60, 63, 64, 75 112, 118, 126, 131, 134, 135, 140, 141 Cooperation, 14 Exploitation, 7, 8, 10, 21, 39, 50, 55

© Springer Nature Switzerland AG 2020 155 I. Karsai et al., Resilience and Stability of Ecological and Social Systems, https://doi.org/10.1007/978-3-030-54560-4 156 Index

Exploration, 7, 8 Gause’s, 6 Extinction Kirchoff, Äôs, 139 mass, 9 Ohm, Äôs, 140 physical conservation, 144 power, 63–75 F scaling, 65 Factors Life history, 13, 19–43, 50, 141, 151, 152 abiotic, 4 Lotka-Volterra equation, 28, 47 biotic, 51 Lotka-Volterra system, 28, 39, 47 extrinsic, 4, 5, 8 intrinsic, 4, 8 M Feedback Master equation, vi, 136, 139, 140, 143 negative, 5, 8, 10, 13, 23, 91, 97, 108, 125, Maximum likelihood, 71 126, 131, 142–144, 150 Metapolybia, 81, 83–85, 137 positive, 5, 91, 108, 131, 143, 144, 149, 150 Model Fixed point, 3, 96 agent-based, vi, 28, 33, 35, 39, 42, 65, Forest fire, 10, 12, 14, 63–75 98–105, 136, 140, 151–153 Fractal dimension, 74 bottom-up, 12, 28, 29, 32–43, 100, 143, Fragmentation 151 of , 10, 47–60 compartment, 47, 48 response threshold, 110, 114 top-down, 28–35, 47, 48, 98–100, 140, 143, G 152 Generalist, 7, 8, 80, 84, 86, 112 Modeling, v, vii, viii, 1–15, 20, 28, 29, 32, 33, 42, 43, 47, 50, 98, 102, 140, 144, 149–153 H Habitat, v, 6, 9–12, 14, 20, 23, 39, 42, 47–60, 63, 64, 66, 68–74, 149, 150 N , 47–60 Netlogo, 51, 66, 152 Homeostasis, 80, 125, 126 Network Homeostatic, 79, 125, 126, 144 complex, 10, 13, 64 Honeybee, 9, 80, 108, 115–121, 132 Network topologies, 126 Hopf bifurcation, 97 “No free lunch” theorem, 7 Noise random, 89, 95, 108, 131 I Nonequilibrium, 64 Inefficient pairing, 27 Insect societies, vi, viii, 14, 80, 82, 100, 108, O 125, 127–129, 131, 134, 143–145 ODD protocol, 33, 51, 66 Integral Open dissipative systems, 79, 125 control, 125–145 Optimization theory, 6 feedback, 126, 131 Optimum Interaction networks, 79, 126 global, 7 Interdisciplinary approach, 2 local, 7 Ordinary differential equations (ODE), 12 Organizational complexity, 2 K Oscillatory behavior, 5 Kirchoff, Äôs, 139

P L Parallel processing, 80 Latin Hypercube, 113–114, 120, 135 Per Capita Paradox, 82 Law Percolation, 64, 65, 74 Index 157

Perturbations, 3–5, 8, 20, 82, 85, 89, 90, 94–96, Self-organized, viii, 64, 65, 74, 80, 100 108, 113, 114, 117, 120, 121, 125, 127, Self-organized criticality, 64, 65, 74 131, 135, 136, 140, 143, 144, 150 Self-organized systems, viii, 80 Phylogenetic, 83 Self-regulation, 79, 125 Point attractors, 5, 142 Sensitivity analysis, 3, 113–114, 121, 134, 135 Polistes, 80, 81 Sex ratio, 13, 19–27, 29–32 Polybia, 81, 82 Social insects, 14, 79, 80, 108 Population dynamics, 4–8, 12, 14, 20, 21, 27, Social life, 14 28, 31, 33, 48, 54, 60 Specialist, 7, 8, 80, 84, 86, 102, 111 , 4, 13, 21, 27–29, 32, 33, 37, 39, 41, Stability 42, 50, 51, 55 ecological, viii, 3–15 Prescribed fire, 12, 64, 75 lyapunov, 3 Starlogo TNG, 33 Q State variable, 51, 66, 95–97, 144 Queuing delay, 81, 82 Stock and flow, 12, 24, 48, 110, 111, 116 Succession, 63

R Randomization, 33 T Recurrence plot, 59 Task, vi, 9, 10, 79–105, 107–121, 127–131, Redundancy, vi, 80, 131, 143, 144 134, 136–138, 140, 142–144 Refuge, 35, 49, 55, 56, 59 Task fidelity, 98–105 Regulation, 4, 8, 14, 15, 82–86, 102, 107–121, Task partitioning, 79–85, 87, 92, 102, 110, 125–145 111, 137 Regulation mechanism, 14, 115, 118, 129–136, Termites, 108 144 Threshold-based, 144 Reliability theory, 80 Trade-off, 7, 8, 36, 92 Resilience, viii, 1–15, 43, 108, 117, 125, 127, Transients, 59, 97, 98 131, 144 allocation, 14 Robustness, 3, 13, 126, 131, 136 V Vensim, 24, 86, 113, 114, 120, 135, 150, 151 Verhulst equation, 21, 151, 151, 153 S Vuong test, 71 Sampling method, 113–114 Saturation, 10, 85–88, 90, 93, 94, 96, 97, 110–112, 116–118, 125–132, 135, 136, W 143 Wasp, 79–105, 107, 108, 110, 111, 115–117, Selection 127, 131, 137, 139–141, 144 natural, 2, 5, 6, 13, 15, 20, 27, 115, 149 Weibull cumulative distribution function, 100 Selection pressure, 5, 7 corridor, 60 Self-organization, 79–105 Workflow, 82, 83, 88