Modeling Techniques
Total Page:16
File Type:pdf, Size:1020Kb
Appendix A Modeling Techniques A.1 Population 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 population growth 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 habitat: 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 populations 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 population model: 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 carrying capacity (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 population size 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.