Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2025 Dec 1.
Published in final edited form as: Methods Ecol Evol. 2024 Oct 18;15(12):2316–2330. doi: 10.1111/2041-210x.14432

Resource-explicit interactions in spatial population models

Samuel E Champer 1,*, Bryan Chae 1, Benjamin C Haller 1, Jackson Champer 2, Philipp W Messer 1,*
PMCID: PMC12002521  NIHMSID: NIHMS2024378  PMID: 40248493

Abstract

1. Continuous-space population models can yield significantly different results from their panmictic counterparts when assessing evolutionary, ecological, or population-genetic processes. However, the computational burden of spatial models is typically much greater than that of panmictic models due to the overhead of determining which individuals interact with one another and how strongly they interact. While these calculations are necessary to model local competition that regulates the population density, they can lead to prohibitively long runtimes. 2. Here, we present a novel modeling method in which the resources available to a population are abstractly represented as an additional layer of the simulation. Instead of interacting directly with one another, individuals interact indirectly via this resource layer. 3. We find that this method closely matches other spatial models, yet can dramatically increase the speed of the model, allowing the simulation of much larger populations. 4. In addition to improved runtimes, models structured in this manner exhibit other desirable characteristics, including more explicit control over population density near the edge of the simulated area, and an efficient route for modeling complex heterogeneous landscapes.

Keywords: computational efficiency, continuous-space population modeling, ecological modeling, exploitation competition, spatial dynamics, species interactions

INTRODUCTION

In this study, we introduce a novel modeling technique for individual-based simulations of continuous-space populations in which competition between individuals is mediated by abstractly simulated resources within the modeled area. Our research goal in designing this method has two parts: first is that the model should exhibit dynamics that closely match the dynamics of existing individual-based continuous-space models with homogeneous landscapes in which competition is simulated via direct interactions between individuals; second is that the model should offer better runtime performance than such models.

Historically, models of evolutionary processes often avoided the inclusion of spatiality by treating populations as well-mixed and randomly mating. This assumption of so-called “panmixia” can allow for tractable mathematical solutions and efficient simulation approaches, and therefore lies at the core of many population models(Kingman, 1982; Wright, 1931). Yet, while panmixia may be a suitable assumption for describing populations in laboratory settings, small islands, and a handful of other cases (Beveridge & Simmons, 2006; Brelsfoard & Dobson, 2012; Pujolar, 2013), there are many contexts in the natural world that can only be accurately investigated with some representation of spatiality (Battey et al., 2020; J. Champer et al., 2021; S. E. Champer et al., 2022; Muktupavela et al., 2022).

One approach for incorporating spatial population structure is to break up a population into discrete subpopulations that are treated as separate panmictic demes linked by migration (Battey et al., 2020; Birch et al., 2007; Epperson, 2003; Lundgren & Ralph, 2019). This can be a good approximation when modeling landscapes with discrete habitat patches, such as separate islands with inter-island dispersal and similar scenarios. However, it may not be well-suited to populations that inhabit larger continuous landscapes.

For such populations, it is often critical to model continuous space explicitly in order to capture key aspects of ecological and evolutionary dynamics. For example, individual-based continuous-space models have been used to examine the wave of advance of a spreading beneficial allele, or the expansion of an invasive species into an area where it has been newly introduced (Fisher, 1937; Garud et al., 2015; Messer & Petrov, 2013; Min et al., 2022; Muktupavela et al., 2022; Urban et al., 2008). Such models have also revealed a more complex range of possible outcomes when modeling interventions against pest populations or invasive species, including cyclical spatial extinction–recolonization dynamics (J. Champer et al., 2021; S. E. Champer et al., 2021).

An expanding frontier in population modeling is to go beyond homogeneous-space models by constructing simulations that take place on a realistic heterogeneous landscape. It is clear that resource-availability, for instance, can have a profound impact on animal behavior (Burgett & Morse, 1974; J. Champer & Schlenoff, 2024; Doherty et al., 2019; SC Banks, 2007). For this reason, several types of population models that take resource availability into account have been developed. The most abstract such models are reaction-diffusion models and other mathematical models based on differential equations, used primarily for theoretical investigations given their high degree of abstraction from the complexity of real-world populations (Cantrell & Cosner, 1991; Hening et al., 2018). Habitat suitability models are another family of mathematical models that are built by correlating species distributions with environmental measurements (Donovan et al., 1987; Gregory et al., 2014; Peterson, 2003). Habitat suitability models have numerous applications, from predicting species invasions to designing interventions such as habitat corridors to aid threatened populations, but they generally do not include effects due to ecological interactions such as competition within and between species, nor can they easily include evolutionary dynamics (Gregory et al., 2014; Peterson, 2003). A less abstracted (but also more computationally intensive) approach for representing heterogeneous resource availability is to include a spatial resource map in individual-based continuous-space models (Booker, 2023; J. Champer et al., 2020; Chevy et al., 2024; Doebeli & Dieckmann, 2003; Lotterhos, 2019, 2023). In such models, the spatial resource map can be created using the same kind of environmental data used to construct habitat suitability models, and can then be used in the context of simulated ecological dynamics within the model, affecting population density, dispersal behavior, and more.

Unfortunately, individual-based simulations of continuous-space populations, on both homogeneous and heterogenous landscapes, are typically marked by much longer runtimes than panmictic or mathematical models, often rendering them a less desirable or outright impractical choice. These longer runtimes are a result of the significant computational cost of spatial calculations. Throughout the simulation, spatial positions are used to make determinations such as which individuals can mate with one another and which are in competition, and these determinations must be updated whenever individuals move, die, or are born. To make these determinations, each individual must ascertain whether or not it is interacting with each other individual; if two individuals interact, the strength of the interaction, usually a function of the distance between the individuals, must then be computed (we will call these “direct-interaction models”). Superficially, it might appear that this process would require on the order of n2 operations for a population of n individuals, but since individuals are usually defined as only interacting when within some threshold distance, the use of a space-partitioning data structure to search for nearby individuals can reduce the workload substantially. The more spatially local the interactions, the greater the performance improvement yielded by such data structures (Bentley, 1975; Haller & Messer, 2019). Nonetheless, spatial calculations still often occupy the majority of the runtime of direct-interaction models, and can thus be the main factor that prevents the use of continuous-space models or limits their practical scale.

Additional problems can crop up near the boundaries of spatial models. If individuals are distributed approximately uniformly, as might be considered appropriate in many cases, individuals at the edges of the simulated area tend to interact with fewer neighbors. Since spatial population regulation depends on local density, this can result in edge areas becoming overpopulated relative to interior areas, which might be an undesired model behavior. Such edge effects can in principle be corrected by calculating local density only within the modeled area (Chevy et al., 2024; Haller & Messer, 2023). However, this correction is not always trivial, and thus represents an additional computational burden, especially when interaction strength is governed by more complex functions of distance, or when modeling an area with an irregular border (such as an island’s coastline) rather than a square or rectangular area.

In the resource-explicit method that we introduce in this study, competitive interactions can be evaluated much faster than in direct-interaction models. This is accomplished by explicitly simulating the resources available to each individual. These resources are abstractly modeled as “resource nodes” which are distributed across the landscape either uniformly, randomly, or as otherwise desired. Competing individuals collect resources from the nodes in their foraging area, reducing the resources available to other individuals. In this way, the local density of individuals is regulated indirectly, through extrinsic resource availability, rather than by direct interactions between individuals. With an appropriately chosen resource-node density, each node can support numerous individuals. Since individuals in this model interact with resource nodes instead of with one another, and given that there are fewer nodes than individuals, competition is determined using fewer total spatial interactions as compared to direct-interaction models, potentially resulting in a substantially faster simulation. Model dynamics near edge areas of resource-explicit models may also be preferable to those in direct-interaction models. Individuals at the edges of the landscape have fewer local competitors, but they are also near proportionately fewer resource nodes (since there are neither competitors nor nodes outside of the modeled area). Consequently, local carrying-capacity density near edges is, by default, the same as in the interior of the landscape without the need for any time-consuming corrections, even when the edge of the landscape has a complex, natural shape like a coastline (although resource nodes near edges could be parameterized with different resource amounts in cases where different edge dynamics are desired).

In this paper, we construct and analyze models using several variants of this method and show that, although interaction strengths between individuals in our resource-explicit models are not defined by a strict function of distance, the overall amount of competition experienced by individuals in our resource-explicit approach is very close to the amount measured by direct interactions, resulting in competition dynamics that are extremely close to those of a direct-interaction model. Furthermore, we show that models using this technique offer much better performance than direct-interaction models when modeling a dense population (running over 20 times faster in our simulation scenarios with a density approximately matching an urban population of rats (Byers et al., 2019)). Given this speedup, our resource-mediated interaction approach can allow simulations to be scaled up well beyond the practical limits of direct-interaction models, opening up new possibilities for biological realism. From these results, then, our method meets our two research goals: closely matching direct-interaction models with homogeneous landscapes, while offering superior runtime performance.

Finally, in the Discussion section, we expand on these results by outlining several extensions to our resource-explicit models that allow the elegant implementation of a number of desirable features. Key among these is the extension of this method to simulating realistic heterogeneous landscapes. This is accomplished by configuring resource nodes with different resource amounts depending on local habitat quality, as determined in much the same way as in habitat suitability models. A demonstration prototype model which simulates a large population of rodents on a heterogeneous landscape (specifically, on the South Island of New Zealand) is presented in the Supporting Information (Additional Extensions part III).

METHODS

In order to facilitate a direct comparison between the resource-explicit technique introduced here and commonly used direct-interaction models, a simple population model was developed to serve as a shared platform. This core model, and the derivations from it described below, are written in the SLiM individual-based forward-time evolutionary modeling framework (version 4.1) (Haller & Messer, 2023).

Our core model implements a population in which competition determines mortality. Individuals inhabit a two-dimensional continuous-space landscape, consisting of a square area with reprising boundaries (meaning that individuals are prevented from dispersing outside the modeled area; if dispersal coordinates located outside the modeled area are drawn, they are redrawn until coordinates within the area are drawn). The simulated area is measured in multiples of a basic “unit area,” defined as the foraging area of an individual of the species being modeled. The foraging radius, r, is thus defined as 1/π (such that the area foraged equals 1), and the maximum distance at which two individuals can interact is defined as 2r, since this is the maximum distance at which there is any overlap between the foraging areas of two individuals. The overall size of the modeled area is controlled by a landscape-size parameter. The carrying-capacity density (carrying capacity per unit area) is controlled by a density parameter.

In each time-step, or “tick”, of the model, individuals first reproduce, and then experience competition-dependent mortality (calculated differently in each of the models and variants described below). In our resource-explicit models (with the exception of one variant described below) as well as our direct-interaction models, mate search is conducted using a direct interaction between males and females (with a maximum interaction distance of 2r) rather than an indirect resource-explicit interaction (because mate-search interactions are sex-constrained, and are thus less of a runtime burden than competitive interactions). A fixed-strength interaction function is used for this purpose, resulting in each female having an equal probability to choose any male within range (other mate-search algorithms could be used, as appropriate for the biology of the modeled species; we chose this algorithm to keep the common parts of this shared platform as simple as possible). Each female that reproduces generates a number of offspring drawn from a Poisson distribution with a mean of eight (a sufficiently high value to result in an overabundant population during competition-based regulation, but otherwise arbitrarily chosen). Newly generated offspring are assigned a spatial position by starting at the same x and y coordinate as their maternal parent and then deviating on each axis by a value drawn from a normal distribution with a mean of zero and a standard deviation of 2r.

Starting from this shared model platform, we derived several model variations differing only in their implementation of competition. Three of the variants are regulated by direct individual–individual interactions using three frequently used interaction functions. These three direct-interaction models are used as a baseline against which we compared four resource-explicit model variants. Finally, we also prepared a panmictic model in order to assess the proportion of runtime spent by the other models on performing spatial computations (as opposed to other necessary functions such as offspring generation).

I. Models with Direct Interactions between Individuals

There are several functions that are commonly used to determine the interaction strength between individuals in spatial models (Fig. 1, left panel). The simplest is a fixed-strength interaction function: all individuals within range interact with the maximum possible strength (we will define this maximum competitive interaction strength to be 1, throughout this paper). Individuals at the maximum interaction range of 2r thus compete just as intensely as individuals that are closer to one another. This is usually an undesirable choice when simulating competition for resources because it can lead to clustering artifacts that may be unrealistic (Haller, B.C., and Messer, 2016). However, this function is the fastest to evaluate. A second option is a linear function: two individuals in the exact same location interact at strength 1, and that interaction strength linearly declines to 0 at the maximum interaction distance. Another option is a Gaussian function, in which two individuals in the same location interact at strength 1, with interaction strength declining non-linearly with distance, implemented in our model as:

strength=e-d22σ2

where d is the distance between the two interactors as a fraction of the maximum interaction distance, and σ is the standard deviation of the interaction function (commonly called its “width”), which determines how quickly interaction strength decays as distance increases.

Figure 1. Interaction functions.

Figure 1.

Individuals in continuous-space models typically interact with one another according to an interaction strength function. Several interaction functions are depicted in the left-hand panel. The right-hand panel depicts competition between two individuals (blue and green diamonds with white outlines) using the circle-intersection function; the circle-intersection function was chosen for illustration because it is the most similar to the interaction strengths produced by our resource-explicit models. The foraging areas of the individuals are represented by blue and green shading; competition strength is proportional to the amount by which these foraging areas overlap (orange shaded area).

Each of these three interaction functions is incorporated into a separate model in this manuscript. For the Gaussian interaction, we used a σ value of 1/3 of the maximum interaction distance to ensure that the interaction strength declines to a suitably small value (0.011) at the maximum interaction distance. After calculating pairwise competition strengths between individuals, mortality for each individual is implemented as the sum of all pairwise competition strengths experienced by an individual divided by the amount expected were the local area at carrying capacity.

In addition to these three common choices, many other functions could be used to calculate interaction strengths (including exponentially decaying interaction strengths, Cauchy-distributed interaction strengths, and t-distributed interaction strengths). One additional function that is relevant here is the “circle-intersection” function. Given that all of the interaction functions considered above define each individual as foraging from a circular area, this function defines the interaction strength between two individuals to be equal to the intersection of their foraging areas (Fig. 1, right panel). For example, this function has been used to describe interference between trees competing for light in some forest models (von Gadow et al., 2021). The resulting function has a strength of 1 for individuals that are in the exact same location, decreasing to 0 at the maximum interaction distance of 2r (at which range the foraging areas of the two individuals intersect at a single point), as described by:

strength=2×cos-1(d)-2×d1-d2π

where d is the distance between individuals as a fraction of the maximum interaction distance. This function is not commonly used in spatial population models (and the runtime of a model using this interaction function was not measured in this manuscript), perhaps due to the amount of computation required. However, it is a well-behaved continuous function based on biologically plausible assumptions, and we have used it in a suite of tests as a point of comparison with the resource-explicit models presented next, since it is the interaction function that is most directly analogous to our approach, as we will explain.

We also include a panmictic model in which individuals are not assigned spatial coordinates. Instead of local competition, a global survival rate is imposed on the basis that all individuals equally compete with all other individuals. This survival rate is calculated as the carrying capacity of the system divided by the current population size. Instead of choosing a nearby mate, females randomly select a male from the population as a whole. The panmictic model is otherwise identical to the other models.

II. Resource-Explicit Models

In the resource-explicit models, the landscape is populated with resource nodes at the outset of the simulation. The number of nodes to be placed on the landscape depends on the desired node density and the size of the landscape. For example, a landscape with a total area of 1,000 times the unit area (the foraging area of an individual) populated with a node density of 25 nodes per unit area will be populated with 25,000 nodes. Given that node density is defined in terms of nodes per unit area, it may be expected that in this example individuals will each, on average, forage from 25 nodes.

Interactions between individuals in the resource-explicit models could be considered analogous to interactions calculated by the circle-intersection function, since individuals in these models forage from nearby nodes in a circular area, and competition between two individuals is proportional to how much their ranges overlap (in terms of how many nodes are shared between them). Two individuals in the same location forage from the same resource nodes, and could thus be considered to have an interaction strength of 1. That interaction strength decreases as the distance between the individuals increases, because the number of nodes they share decreases.

Resource nodes are assigned a value representing the amount of resources available in the local area, which is dependent on the density parameter of the modeled species as well as the density of the resource nodes. To continue the previous example, if the population has a carrying-capacity density of 100 individuals per unit area and nodes have a density of 25 per unit area, then each node has resource value of 4.

The resource-explicit models developed in this study were each tested with three different resource-node placement methods: a uniform hexagonal tiling of the landscape, a uniform square tiling of the landscape, and a random placement of nodes across the landscape. For the random placement method, each node was given an independently drawn x- and y-coordinate from a uniform distribution spanning the modeled area, with positions re-randomized each tick of the model to produce a uniform average density of nodes over time despite random local density fluctuations in each tick. Each of these placement methods was tested with a density of 12, 25, and 50 nodes per unit area. Although resource nodes may conceptually consist of a two-dimensional area (and are depicted as polygons in some figures), the resource nodes in the model are point entities.

In the SLiM models presented in this manuscript, resource nodes are implemented as a second species for which no life cycle is defined (i.e., no mortality or reproduction) that spatially interacts with the modeled individuals. Similar implementations may be possible in other modeling frameworks.

See “Resource Node Placement Methods” in the Supporting Information for a more detailed description of these methods, along with guidance on choosing node density and placement method.

II.A. Competition in Resource-Explicit Models

We implemented two alternative methods governing how foraging competition is calculated within the resource-explicit framework. In the first of these, individuals forage from an “inelastic” foraging area, only gathering resources from within a fixed distance. In the second method, individuals forage from an “elastic” range, and can potentially forage from further away in order to maintain a full-sized foraging area.

In the “inelastic” method (Fig. 2, left panels; see Supplemental Figs 1 and 2 for versions of this figure that use a hexagonal tiling and a random distribution of resource nodes, respectively), individuals forage from all of the resource nodes that are within their foraging radius, r. Competition in the inelastic model is calculated by first iterating through each resource node. Each node tallies local demand as the number of individuals within distance r and then sends each such individual an amount of resources equal to the total amount at that node divided by the local demand. After each node has distributed its resources, individuals are assigned a probability of survival according to their amount of resources received, as described in the following example.

Figure 2. Visualization of resource-explicit interaction algorithms, square tiling.

Figure 2.

Competition between two individuals (blue and green diamonds) is determined by the portion of their foraging area that overlaps and by the interaction algorithm used in the model. The foraging areas are represented by blue and green shading; the overlapping area is shaded orange. In the inelastic model (left), individuals forage from resource nodes (dots at the center of each square) within their foraging radius. In the elastic model (right), individuals forage from as many nodes as necessary to maintain a nominally sized foraging area (in this case comprising 50 nodes). Away from the edges of the landscape (top row), the two models behave similarly but not identically: in the inelastic model (upper left panel), the blue individual happens to forage from 51 nodes (due to its precise spatial position within the grid), resulting in slightly greater competition. The difference between the two models is much greater in the corner of the landscape (bottom row): the blue individual has a much smaller area in the inelastic model, whereas the blue individual in the elastic model forages from much further away to maintain a full-sized foraging area, resulting in greater competition.

If the resource node density is 25 nodes per unit area and the carrying-capacity density of the modeled species is 100 individuals per unit area, then each node has a total resource value of 4. If the current population size is five times the total carrying capacity of the system, and individuals are uniformly distributed, then each of the 25 nodes an individual forages from provides an average of 4 / 500 resources (supply at the node divided by the average demand). After collecting resources from 25 such nodes, individuals will have collected an average resource amount of (4 / 500) × 25 = 1 / 5. The amount of resources collected is directly used as a survival rate (20%, in this case), which will, on average, bring the population to its carrying capacity.

In models using the inelastic method, individuals are not guaranteed to have access to the full number of resource nodes that corresponds to the defined foraging area (the “nominal” foraging area of the species). Indeed, individuals in the corners of the landscape might forage from only a quarter of their nominal foraging area (Fig. 2, bottom left panel; see Supplemental Figs 1 and 2). Even individuals in the interior of the landscape may have access to somewhat more or fewer nodes (for example, the blue individual in the upper left panel of Fig. 2 forages from 51 nodes, while the nominal foraging area is 50 nodes). Individuals in the interior of the landscape with fewer nodes in range have proportionately lower rates of survival, whereas individuals with more nodes in range have proportionately higher rates of survival. Near the edge of the landscape, individuals have access to fewer nodes, but those nodes are also foraged at by fewer competitors, so these effects will tend to balance out.

In the “elastic” method (Fig. 2, right panels; see Supplemental Figs 1 and 2), individuals forage from as many nodes as necessary in order to maintain their nominal foraging area – though they are limited to the nodes that exist within radius R, where R is greater than the foraging radius r in the inelastic model. Given a node density of n nodes per unit area, individuals will attempt to forage from the nearest n nodes. With a sufficiently large R, individuals will always maintain their full nominal foraging area (an R of two times r is sufficient given a square landscape, and this value was used in the models in this manuscript). In this way, individuals near the edges of the landscape are able to forage from further away to compensate for the lack of nodes in their vicinity, resulting in an elastic foraging area (Fig. 2, bottom right panel; see Supplemental Figs 1 and 2).

In the elastic method, competition is determined as follows. First, all individuals are iterated through, and the nearest n resource nodes to each individual that are within radius R are recorded. In the process, every time a resource node is recorded, a variable belonging to the node that tracks local demand is incremented by one. After this, all individuals are iterated through once again. During this second iteration, each individual receives resources from each of their nodes according to the amount at the node divided by the local demand at that node. After receiving resources, individuals are assigned a survival probability according to the amount received, in the same manner described above for the inelastic method.

II.B. Additional Resource-Explicit Model Variants

In addition to the basic inelastic and elastic models above, we include two variants of the inelastic model. The changes that define these variants are compatible with one another, and could be combined in a single model if desired.

Fair variant.

This variant corrects for the spatial variation in mortality rate found in the default inelastic model, such that the survival rate of an individual is unaffected by having access to more or fewer resource nodes. This is achieved by performing a preliminary iteration through the nodes and incrementing a variable for each individual that tracks the number of nodes it forages from (with this variable denoted fx for a given individual x). Then, the amount of resources an individual i receives from a given resource node is determined as follows:

received(i)=afi×jC1fj

where a is the amount of resources available at the node, and C is the set of all competitors receiving resources from the node.

In this variant, conceptually, all individuals have an equal amount of time or energy to forage within their foraging area. Individuals with fewer nodes in range spend more time at each of those nodes, and thus gather more resources from them, while individuals with more nodes in range spend less time at each node.

Resource-explicit reproduction variant.

This variant replaces the mate-search interaction with a resource-explicit interaction, thus replacing all direct interactions between individuals with interactions between individuals and resource nodes. Before reproduction takes place, each node caches a list of males that are within foraging range. Then, rather than directly searching for and choosing a nearby male, females instead select a mate from the concatenated lists of males cached at all of the nodes within foraging range.

The result of this approach is that potential mates are not chosen with equal probability, as in the other models. For example, if a male and female have ranges that only overlap at a single resource node, that male will be in the female’s list of candidate mates only a single time. A closer male who shares 25 nodes with the female will be duplicated in the list 25 times, resulting in a 25 times higher chance for the female to select the closer male. Note that similar dynamics can be implemented using a direct interaction with an appropriate interaction function.

III. Model Summary

To summarize, we developed seven spatial models and one panmictic model. The seven spatial models share a common core process-schedule, differing only in how competition is simulated (with a single exception in which mate selection also differs). The first step during each tick of the models is that females search for mates (using a fixed-strength direct interaction, except in the “resource-explicit reproduction variant”). Mated females then produce an average of eight offspring, which disperse away from their female parent. Next, individuals compete using one of six competition algorithms: three direct-interaction functions (fixed-strength, linear, and Gaussian) and three resource-explicit interactions (elastic, inelastic, and “fair” inelastic; the “resource-explicit reproduction variant” uses the inelastic competitive interaction). Competition strength is used to calculate mortality. After mortality, the model moves to the next tick, starting again with mate selection. The panmictic model matches this core model, but with global competition and without dispersal.

RESULTS

Our research goal in designing this resource-explicit method was that the dynamics of the resulting model would closely match those of a comparable direct-interaction model with a homogeneous landscape. In order to determine whether this goal was met, we conducted several analyses measuring interaction strengths within each variant of the method. We then performed a series of tests measuring the runtime of the variants over a range of population sizes, population densities, and resource-node densities. Results shown here are for square-tiled models. Equivalent results for models with a hexagonal tiling and models with random node placement are depicted in the Supporting Information.

I. Dynamics of the Resource-Explicit Models

The resource-explicit models replace direct competitive interactions between individuals with indirect competition for resources at discrete nodes located across the landscape. The resulting indirect interaction function differs from commonly used direct-interaction functions in two qualitative ways. First, the indirect interaction function is discontinuous: as the distance between the two individuals increases, the number of nodes they share, and thus their interaction strength, decreases in discrete steps, not continuously. Second, the indirect interaction function is not position-invariant: two individuals at a given distance may interact with a different strength depending on their specific positions on the landscape with respect to the resource nodes.

However, a quantitative assessment reveals that the effects of these qualitative differences on the interaction strengths in the resource-explicit models are minimal, with interaction strengths closely matching those calculated using the circle-intersection interaction function. To compare interaction strengths between methods, a pair of individuals was placed at random locations on a large landscape, and interaction strengths between the individuals were measured using the circle-intersection function, the inelastic resource-explicit method, and the elastic resource-explicit method. This was repeated 2 million times in each of nine separate resource-node placement scenarios (hexagonal tiling, square tiling, and random placement, each at a density of 12, 25, and 50 nodes per unit area). Individuals were not placed near the edges of the landscape in order to avoid the additional complications produced by edge dynamics (primarily, when modeled using the elastic interaction method, individuals near edges compete with more distant individuals than in the inelastic model or in a direct-interaction model; see Fig. 1, lower panels). Each interaction strength measured using the circle-intersection function was then subtracted from the corresponding measurement from each resource-explicit model to yield distributions of differences (Fig. 3; hexagonally tiled and randomly distributed equivalents are depicted in Supplemental Figs 4 and 5; see Supplemental Figs 813 for a series of visualizations of interaction strengths in the resource-explicit framework when using uniform tilings).

Figure 3. Differences in interaction strength between resource-explicit models and the circle-intersection function, square-tiled.

Figure 3.

Two million pairwise interaction strengths between randomly placed individuals as measured by the circle-intersection function were subtracted from those measured in resource-explicit models to yield a distribution of the deviation from the circle-intersection function for each model. As node density increases, the standard deviation decreases. These distributions all have a distinctive peak just below 0 due to cases where pairs of individuals have a very small but non-zero interaction strength when using the circle-intersection function, but the small overlapping portion of their foraging areas does not include any resource nodes.

This analysis found that the variation in interaction strength in the resource-explicit models decreases as the density of resource nodes increases. Furthermore, variance in the elastic model was lower than in the inelastic model in some cases. Using either a square or hexagonal tiling (Fig. 3 and Supplemental Fig. 4) the interaction strengths closely mirrored those calculated by the circle-intersection function, with a standard deviation in interaction strengths of 0.018 or less at a density of 50 nodes per unit area, and as high as 0.056 at a density of 12 nodes per unit area. When resource nodes were randomly placed (Supplemental Fig. 5), the standard deviation in interaction strengths was substantially higher, measuring 0.049 and 0.054 at a density of 50 nodes per unit area in the elastic and inelastic models respectively, and 0.100 to 0.113 at a density of 12 nodes per unit area.

These distributions show that any given pairwise interaction strength in a resource-explicit model tends to be fairly close to the strength as calculated by the circle-intersection function. However, each individual in a spatial model typically interacts with many other individuals. These stochastic differences further average out over all of the interactions that determine the overall level of competition experienced by each individual. To quantify potential differences in overall competition experienced by individuals in the resource-explicit models, we conducted an additional analysis in which a population of 400,000 was simulated using the inelastic, “fair” inelastic, and elastic method at a density of 20 individuals per unit area. After the offspring generation step of the tenth tick of the simulation, the survival rates of the centermost 100,000 individuals were recorded (as before, only central individuals were selected in order to avoid distortion produced by different edge dynamics). The survival rates for each individual were then recalculated as would be done in a direct-interaction model using the circle-intersection function. The survival rates for each individual calculated by the circle-intersection function were then subtracted from those calculated using the resource-explicit function to yield a distribution of differences in survival rates experienced by the individuals in the model. This distribution of differences in survival rate reveals that the resource-explicit models match the circle-intersection interaction function very closely (Fig. 4; hexagonally tiled and randomly distributed equivalents are depicted in Supplemental Figs 6 and 7) – even more closely than the analysis that assessed pairwise interactions one at a time (Fig. 3) indicates. At a density of 12 nodes per unit area, the standard deviation of the inelastic model was 0.018 using square tiling, 0.008 using hexagonal tiling, and 0.058 using randomly placed nodes. However, the standard deviation of the “fair” inelastic and the elastic model were much lower – no more than 0.002 in the regularly tiled models, though up to 0.034 in the model with randomly placed nodes.

Figure 4. Differences in survival rate between resource-explicit models and a direct-interaction model using the circle-intersection function, square-tiled.

Figure 4.

The survival rates of 100,000 individuals were measured using the inelastic method, the “fair” inelastic method, the elastic method, and the circle-intersection function. Strengths measured by the circle-intersection function were subtracted from measurements made using the other resource-explicit methods for each individual to yield distributions of differences.

In the inelastic model, individuals sometimes forage from slightly more or fewer nodes than their nominal foraging area, resulting in a reduced or increased mortality rate. This is the reason for the multimodal distribution in the inelastic models in Fig. 4 (and Supplemental Figs 6 and 7). For example, the central peak in the lower left panel is the distribution of survival rates for individuals who foraged from 12 nodes, while the peaks to the left and right of the central peak are the distributions of survival rates for individuals who foraged from 11 and 13 nodes, respectively. In the uniformly tiled models, this phenomenon could be described as a repeating, micro-scale habitat-quality gradient within each tile of the model (Supplemental Figs 1419, depicting the exact number of nodes within interaction range of an individual at every position within a regularly tiled grid of nodes for three densities of square tiling and three densities of hexagonal tiling). In most cases, this variation in mortality rate can be disregarded as a negligible source of stochasticity subsumed within the stochasticity of mortality determinations. In particular, the mortality rate of individuals varies slightly based on their positions, but their positions within the micro-scale habitat-quality gradient are random, and the total number of survivors after mortality calculations in each time step will, in either case, reflect the amount of resources available across the landscape. However, this phenomenon may be more of an issue in sparse populations with small litter sizes. In such models, outcomes could be affected if a few individuals randomly experience premature mortality just because they happen to disperse into a particularly inhospitable micro-habitat within a tile. For modeling such systems, the “fair” variant which compensates for these effects (see the Methods section) may be preferable because survival rates in this variant are almost identical to those in the elastic model (Fig. 4 and Supplemental Figs 6 and 7).

II. Computational Performance

To assess the runtime performance of each method, a series of simulations was conducted. For each model, 40 measurements of the elapsed runtime per tick were taken with each of two population sizes (100,000 and 1 million individuals), at each of two levels of population density (20 and 200 individuals per unit area), and at each of three levels of resource-node density (a square tiling of 12, 25, and 50 nodes per unit area). This was a fully factorial experimental protocol in which each parameter was paired with every combination of the other parameters (Table 1; hexagonally tiled and randomly distributed timings are depicted in Supplemental Tables 1 and 2). Simulations were performed on a desktop computer using an Intel i9-9900K CPU, on which only a single simulation was performed at a time in order to keep conditions across simulations as consistent as possible. Absolute runtimes in other contexts will vary.

Table 1. Model runtimes, square tiled.

Forty measurements of elapsed runtime per tick were collected and averaged for each method at each density and population size and at each of three node-placement densities. For the resource-explicit models depicted in this table, a square tiling of nodes was used. Color bars show the runtime of each model, on a different scale within each column, relative to the slowest runtime within that column.

graphic file with name nihms-2024378-t0001.jpg

Memory usage of the models is not presented in detail here, but it was observed that the elastic models used up to three times as much memory as the direct-interaction models, while the default inelastic model, the “fair” variant, and the “resource-explicit reproduction” variant used 1.2, 1.4, and 1.7 times as much memory as the direct-interaction models, respectively. Memory use of the models was not assessed as rigorously as runtime because the memory costs of spatial interactions will often be negligible compared to other memory requirements of the model, and it is usually only the peak amount of memory used by a model that matters, as that is the amount that will need to be reserved. For example, the memory requirements of most models that include simulated genetics will be dictated by the amount of memory required for that purpose.

A key finding of this analysis (Table 1) is that the resource-explicit models were minimally affected by the density of the population, unlike the direct-interaction models (note that the color bars have a different scale within each column). When simulating the higher-density population, even the slowest of the resource-explicit methods significantly outperformed the fastest direct-interaction spatial model (which, in all cases, was the “fixed-strength” model). When simulating a dense population of 1 million individuals, the “resource-explicit reproduction” variant of the inelastic model (the fastest resource-explicit model in this context) was up to 23 times faster than the fixed-strength model. At lower density, the elastic resource-explicit models ran at around the same speed as the fixed-strength model, or in some cases even more slowly (particularly when node density was higher than carrying-capacity density). The inelastic models were at least twice as fast as the elastic model, however, and were thus markedly faster than the fixed-strength model even at lower density.

The reason that the runtimes for the resource-explicit models do not rapidly increase as density increases is that, given a specified population size, a higher-density population entails a smaller landscape, and thus fewer resource nodes (each of which provides more resources). Thus, the overall amount of processing done remains roughly constant. As population density decreases, however, even the most efficient of the resource-explicit models would eventually perform more poorly than a model regulated by direct interactions (suggesting that the two approaches to modeling interactions might have a complementary set of use cases; see the Discussion section). The exact density at which this performance crossover occurs depends on the node density and whether competition is modeled as regulating mortality or fecundity (since that choice affects the size and density of the population when competitive interactions are evaluated).

Very little runtime difference was observed between the square and hexagonal tilings (Supplemental Table 1), while the models in which nodes were randomly distributed during each tick of the model ran at about the same speed at higher population density, but somewhat slower at lower population density (Supplemental Table 2).

Comparing the inelastic model and its two variants, the “fair” variant added only a modest amount to the runtime of the default inelastic model. The “resource-explicit reproduction” variant was slower than the default inelastic model at lower population density, but ran faster at higher density. This was therefore the fastest model in the simulations with higher density, whereas the default inelastic model was the fastest at lower density.

Finally, the panmictic model provides a baseline comparison that shows that the vast majority of the runtime of the other models was indeed spent handling spatial interactions. In models with complex genetics or other computational overhead, spatial calculations may account for a lower proportion of the total runtime. For such models, switching to a resource-explicit modeling approach would thus not yield as great a degree of relative speedup.

DISCUSSION

In this manuscript, we introduced a resource-explicit modeling approach in which the resources available to each individual are directly represented. Individuals therefore compete only indirectly with one another by interacting with the resources around them. This method comes with several advantages over commonly used direct-interaction spatial models, with runtime improvement arguably being the most salient. The resource-explicit approach will allow for the simulation of hitherto impractically large populations, while also allowing for studies of smaller populations to be conducted more quickly and efficiently. In addition to runtime advantages, there are a number of model features that can be easily and efficiently implemented in a resource-explicit model, some of which are difficult to implement in direct-interaction models. The following six examples provide an incomplete list of such features.

1. Heterogeneous landscapes and irregular area boundaries.

The resource-explicit approach elegantly lends itself to the simulation of competition on landscapes with heterogeneous resource availability. To accomplish this, nodes can simply be parameterized with different resource amounts depending on the local habitat quality in different areas of the landscape (which could be based on a preexisting spatial map or determined using similar methods to those used to develop habitat suitability models (Donovan et al., 1987)). When an individual forages, the quality of the habitat in which it lives will thus be reflected in the amount of resources available in the nodes that make up its foraging area, without any additional computational overhead or additional code (aside from the initial parameterization of the nodes). This holds even for individuals that abut irregular boundaries such as coastlines. For example, in a model of an island population of rats, individuals might be barred from dispersing into the ocean. Individuals near coastlines would tend to compete with fewer neighbors, but this should not result in such individuals having a higher survival rate (since there are not many resources available in the ocean for rats). In a direct-interaction model, this could necessitate a computationally expensive edge-effect correction, whereas in a resource-explicit framework no additional work would be necessary beyond specifying the amount of resources available at each node. If, on the other hand, the modeled species were able to efficiently exploit offshore resources, this could be modeled by extending the placement of resource nodes some distance beyond the coastline, resulting in an increased density along the coastline. In this way, the resource-explicit method allows the presence and the strength of edge effects in the model to be tailored to the biology being simulated.

Modeling a heterogeneous landscape could be desirable for several reasons. First, outside of laboratory populations, most animals live in habitat with at least some degree of variation. At the most basic level, this means that many species could be expected to exhibit population density variation in response to variation in habitat quality. Furthermore, heterogeneity in the abundance of available resources can directly affect animal behavior (Burgett & Morse, 1974; J. Champer & Schlenoff, 2024; Doherty et al., 2019; SC Banks, 2007). This can include important behaviors such as whether an ant colony chooses to go to war with another colony, or whether bees swarm to form a new colony (Burgett & Morse, 1974; J. Champer & Schlenoff, 2024).

Using a random distribution of resource nodes has some notable applications in modeling heterogeneous landscapes. A model in which nodes are randomly placed at the beginning of the model and then not re-shuffled could be used to generate a new random heterogeneous landscape in each simulation. Alternatively, the version presented in this manuscript, in which nodes are shuffled each tick, could be used in conjunction with a landscape map to allow simulations to run without any pre-calculation of resource-node positions or resource values. In such a model, the landscape map could control the resource values of randomly placed nodes based on their locations, or could be used to implement a more complex node placement algorithm in which nodes are more likely to be placed in higher-quality habitat, using a technique such as rejection sampling. However, grid placements of nodes with precalculated resource values may be preferred for performance reasons, or to minimize variance in interaction strengths.

2. Multiple types of resources.

Many species require different types of resources at different stages of life, or need a different resource to reproduce than they normally forage on. Some examples include monarch butterflies, which can feed on nectar from many plants but only lay their eggs on milkweed, or mosquitos, which require water habitat resources as larvae, feed on nectar as adults, and only lay eggs after taking a blood meal (S. E. Champer et al., 2022; Eckhoff, 2011; Oberhauser et al., 2004). In a resource-explicit model, nodes can be parameterized with a separate value for each type of resources, allowing for the simulation of complex life histories while adding little overhead to the model.

3. Interspecies competition.

The resource-explicit modeling approach is convenient for implementing models that include competition between multiple species. Each species in such a system need only interact with the resource nodes. By contrast, in direct-interaction models, pairwise interactions as between each species must be considered, resulting in quadratic growth in the complexity of the model. Predator–prey interactions can also be defined in a resource-explicit manner, similar to the way in which the mate-search interaction is defined in the “resource-explicit reproduction” model.

For example, a model might simulate competition between Pacific rats, black rats, and brown rats. Individuals of these species might compete for the same resources (at least partially, and likely with different levels of efficiency). With a direct-interaction approach, the pairwise interactions between individuals of each pair of species would have to be evaluated (including intraspecies interactions, for six differently defined interactions in total). A resource-explicit model would only need to include a specification of how each of the three species interacts with the resources; the competitive effects within and between species would follow automatically.

Differently sized foraging areas for different species can be implemented by setting different species to forage from different numbers of nodes in the elastic model, or by setting a different foraging radius in the inelastic model. However, this will be most efficient when the size of the foraging areas of the species in the model are within roughly an order of magnitude of one another, to keep the number of nodes interacted with by each individual within reasonable bounds.

4. Resource variability as a function of time.

Resource-explicit models are also amenable to simulating variation in resource availability as a function of time, whether in the form of periodic variation (such as seasonality), random variation (such as tree masting), or long-term trajectories (such as changes caused by climate change) (King, 1983; Mantyka-Pringle et al., 2012; Pearse et al., 2016). To accomplish this, resource nodes can be replenished according to an appropriate function of time, rather than always replenishing to a fixed value.

5. Species-induced habitat change.

In addition to competing for resources, many species also have a direct effect on the landscape in which they live. For example, many species of bacteria and yeast, such as the beloved Saccharomyces cerevisiae (brewer’s yeast), ingest sugars and excretes ethanol (Shopska et al., 2022). As the concentration of alcohol increases and the availability of sugars decreases, the habitability and the resource availability of their environment both decrease. A resource-explicit modeling approach could allow for the spatial modeling of these processes by explicitly tracking the amount of sugar and alcohol at each resource node, enabling the elegant modeling of spatial environments such as Petri dishes. Some animals can also induce environmental changes that are helpful to themselves (“niche construction”) (Jones et al., 1994). A resource-explicit model could, for example, track the increasing abundance of fish in a pond after a beaver extends its dam by changing the resource values at corresponding nodes, and could even simulate the flooding of the landscape using elevation values associated with each resource node.

6. Imperfect resource regeneration rate.

In many natural systems, groups of animals extract local resources much faster than those resources can replenish. For example, herds of grazing animals might eat grass in their local area much faster than it grows, but the animals survive by moving across the landscape, leaving previously exploited areas time to recover. Such dynamics can be implemented in a resource-explicit model by parameterizing nodes with an appropriate maximum value along with a regeneration function. Such a model could be further enhanced by designing dispersal within the model to be influenced by resource availability such that individuals tend to disperse towards areas where resources are the most plentiful. Another enhancement could be made by incorporating a functional response by consumers to resource density by imposing a penalty on resource collection from low quality areas or areas where resources have not been fully replenished, reflecting the increased effort of finding food when it is sparse. This design would create a strong foundation for a highly detailed model of herd-animal behavior.

To illustrate the possibilities for extending and modifying the basic resource-explicit approach, as discussed above, we provide three additional extensions in the Supporting Information. The first is a variant of the elastic model that is optimized for infrequent dispersal (Additional Extensions part I in the Supporting Information). The second is a variant with a semi-fixed population size, which may be desirable for modelers seeking to construct spatial analogs of analytical models with fixed population sizes (Additional Extensions part II). The third is a scaled-up demonstration model that simulates a population of 10 million rodents on the South Island of New Zealand, including seasonality and a heterogeneous landscape, yet still achieves good performance (Additional Extensions part III).

In the big picture, the resource-explicit modeling approach is related to approaches used in several other fields that utilize spatial approximations or discretizations to increase performance. In computational fluid dynamics, fluids are treated as comprising many discrete cells, since the simulation of individual molecules is not tractable for most applications (Leer & Powell, 2010). In computational astrophysics, the Barnes–Hut method reduces the complexity of n-body simulations from O(n2) to O(n log n) by using an octree data structure and then aggregating the interaction forces exerted by distant objects into a combined force vector (Barnes & Hut, 1986). As in these other fields, the resource-explicit approach entails some degree of approximation in order to achieve performance gains.

In the case of the resource-explicit approach, this approximation involves exchanging a strict functional correspondence between distance and interaction strength for a system in which interaction strength has a distribution of possible values for a given distance between individuals (Fig. 3). The circle-intersection interaction function which this distribution approximates can be biologically rationalized as reflecting resource-foraging behavior, and the indirect interaction strengths in the resource-explicit models match the circle-intersection function quite closely. In many cases, the variation in pairwise interaction strengths is negligible – averaging out across the numerous interactions an individual experiences (Fig. 4), or otherwise outweighed by the broader stochasticity of mortality in most individual-based models. In cases where minimizing the variation in interaction strengths is worth slower runtimes, a higher density of resource nodes can be used, whereas a lower density can be used when increased variation is a worthwhile tradeoff for faster runtimes.

There are some scenarios in which the resource-explicit approach might not be the preferred choice. This approach emulates indirect competition between individuals mediated by shared resources. For systems where direct or “interference” competition is more important, it may make more sense to simulate direct interactions between individuals, even at the price of longer runtimes. Furthermore, in systems with very low densities or small populations, a resource-explicit model might run more slowly than a direct-interaction model. However, runtimes are not the only consideration in model design, and the other properties and capabilities of resource-explicit models may prove desirable even at the cost of runtime speed when modeling sparse populations.

In many contexts, the resource-explicit methods presented here provide excellent performance and a high degree of flexibility. These methods enable spatial simulations of populations that are intractably large to model with direct individual–individual interactions, and facilitate a highly efficient approach to implementing landscape heterogeneity and complex resource-exploitation behaviors. We therefore believe that these new methods will prove an essential addition to the spatial modeler’s toolkit.

Supplementary Material

Supinfo

ACKNOWLEDGEMENTS

This study was supported by funding from the National Institutes of Health awards R01GM127418, R01HG012473, and R35GM152242 to P.W.M.

Footnotes

CONFLICT OF INTEREST STATEMENT

We, the authors, declare that we have no conflicts of interest.

DATA AND CODE AVAILABILITY

The SLiM code for the models used in this manuscript are available at https://doi.org/10.5281/zenodo.13743328 (S. E. Champer et al., 2024). The SLiM simulation software used in the project is available at https://messerlab.org/slim/ or at https://github.com/MesserLab/SLiM. Modelers seeking to develop resource-explicit models based on those presented in this manuscript are invited to ask for support by raising issues on the resource-explicit models GitHub page at https://github.com/MesserLab/ResourceExplicitModels.

REFERENCES

  1. Barnes J, & Hut P (1986). A hierarchical O(N log N) force-calculation algorithm. Nature, 324(6096), 446–449. 10.1038/324446a0 [DOI] [Google Scholar]
  2. Battey CJ, Ralph PL, & Kern AD (2020). Space is the Place: Effects of Continuous Spatial Structure on Analysis of Population Genetic Data. Genetics, 215(1), 193. 10.1534/GENETICS.120.303143 [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Bentley JL (1975). Multidimensional binary search trees used for associative searching. Communications of the ACM, 18(9), 509–517. 10.1145/361002.361007 [DOI] [Google Scholar]
  4. Beveridge M, & Simmons LW (2006). Panmixia: an example from Dawson’s burrowing bee (Amegilla dawsoni) (Hymenoptera: Anthophorini). Molecular Ecology, 15(4), 951–957. 10.1111/J.1365-294X.2006.02846.X [DOI] [PubMed] [Google Scholar]
  5. Birch CPD, Oom SP, & Beecham JA (2007). Rectangular and hexagonal grids used for observation, experiment and simulation in ecology. Ecological Modelling, 206(3–4), 347–359. 10.1016/J.ECOLMODEL.2007.03.041 [DOI] [Google Scholar]
  6. Booker TR (2023). Spatial autocorrelation of the environment influences the patterns and genetics of local adaptation. BioRxiv, 2023.05.29.542754. 10.1101/2023.05.29.542754 [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Brelsfoard CL, & Dobson SL (2012). Population genetic structure of Aedes polynesiensis in the Society Islands of French Polynesia: Implications for control using a Wolbachia-based autocidal strategy. Parasites and Vectors, 5(1), 1–12. 10.1186/1756-3305-5-80/TABLES/7 [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Burgett DM, & Morse RA (1974). The Time of Natural Swarming in Honey Bees,. Annals of the Entomological Society of America, 67(4), 719–720. 10.1093/AESA/67.4.719 [DOI] [Google Scholar]
  9. Byers KA, Lee MJ, Patrick DM, & Himsworth CG (2019). Rats About Town: A Systematic Review of Rat Movement in Urban Ecosystems. Frontiers in Ecology and Evolution, 7(JAN), 13. 10.3389/fevo.2019.00013 [DOI] [Google Scholar]
  10. Cantrell RS, & Cosner C (1991). The effects of spatial heterogeneity in population dynamics. Journal of Mathematical Biology, 29(4), 315–338. 10.1007/BF00167155/METRICS [DOI] [Google Scholar]
  11. Champer J, Kim IK, Champer SE, Clark AG, & Messer PW (2021). Suppression gene drive in continuous space can result in unstable persistence of both drive and wild-type alleles. Molecular Ecology, 30(4), 1086–1101. 10.1111/MEC.15788 [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Champer J, & Schlenoff D (2024). Battles between ants (Hymenoptera: Formicidae): a review. Journal of Insect Science, 24(3), 64. 10.1093/JISESA/IEAE064 [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Champer J, Zhao J, Champer SE, Liu J, & Messer PW (2020). Population dynamics of underdominance gene drive systems in continuous space. ACS Synthetic Biology, acssynbio.9b00452. 10.1021/acssynbio.9b00452 [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Champer SE, Chae B, Haller BC, Champer J, & Messer PW (2024). MesserLab/ResourceExplicitModels: Resource-Explicit Interaction Models. 10.5281/ZENODO.13743328 [DOI] [PMC free article] [PubMed]
  15. Champer SE, Kim IK, Clark AG, Messer PW, & Champer J (2022). Anopheles homing suppression drive candidates exhibit unexpected performance differences in simulations with spatial structure. ELife, 11. 10.7554/ELIFE.79121 [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Champer SE, Oakes N, Sharma R, García-Díaz P, Champer J, & Messer PW (2021). Modeling CRISPR gene drives for suppression of invasive rodents using a supervised machine learning framework. PLOS Computational Biology, 17(12), e1009660. 10.1371/JOURNAL.PCBI.1009660 [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Chevy ET, Min J, Caudill V, Champer SE, Haller BC, Rehmann CT, Smith CCR, Tittes S, Messer PW, Kern AD, Ramachandran S, & Ralph PL (2024). Population genetics meets ecology: a guide to individual-based simulations in continuous landscapes. BioRxiv, 2024.07.24.604988. 10.1101/2024.07.24.604988 [DOI] [PMC free article] [PubMed] [Google Scholar]
  18. Doebeli M, & Dieckmann U (2003). Speciation along environmental gradients. Nature, 421(6920), 259–264. 10.1038/NATURE01274 [DOI] [PubMed] [Google Scholar]
  19. Doherty TS, Fist CN, & Driscoll DA (2019). Animal movement varies with resource availability, landscape configuration and body size: a conceptual model and empirical example. Landscape Ecology, 34(3), 603–614. 10.1007/S10980-019-00795-X/FIGURES/4 [DOI] [Google Scholar]
  20. Donovan ML, Rabe DL, & Olson CE (1987). Use of Geographic Information Systems to Develop Habitat Suitability Models. Wildlife Society Bulletin (1973–2006), 15(4), 574–579. http://www.jstor.org/stable/3782586 [Google Scholar]
  21. Eckhoff PA (2011). A malaria transmission-directed model of mosquito life cycle and ecology. Malaria Journal, 10(1), 1–17. 10.1186/1475-2875-10-303/FIGURES/8 [DOI] [PMC free article] [PubMed] [Google Scholar]
  22. Epperson BK (2003). Geographical genetics. 356.
  23. Fisher RA (1937). The Wave of Advance of Advantageous Genes. Annals of Eugenics, 7(4), 355–369. 10.1111/J.1469-1809.1937.TB02153.X [DOI] [Google Scholar]
  24. Garud NR, Messer PW, Buzbas EO, & Petrov DA (2015). Recent Selective Sweeps in North American Drosophila melanogaster Show Signatures of Soft Sweeps. PLOS Genetics, 11(2), e1005004. 10.1371/JOURNAL.PGEN.1005004 [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Gregory SD, Ancrenaz M, Brook BW, Goossens B, Alfred R, Ambu LN, & Fordham DA (2014). Forecasts of habitat suitability improve habitat corridor efficacy in rapidly changing environments. Diversity and Distributions, 20(9), 1044–1057. 10.1111/DDI.12208 [DOI] [Google Scholar]
  26. Grünbaum B, & Shephard GC (1977). Tilings by Regular Polygons. Mathematics Magazine, 50(5), 227. 10.2307/2689529 [DOI] [Google Scholar]
  27. Haller BC, & Messer PW (2019). SLiM 3: Forward Genetic Simulations Beyond the Wright–Fisher Model. Molecular Biology and Evolution, 36(3), 632–637. 10.1093/MOLBEV/MSY228 [DOI] [PMC free article] [PubMed] [Google Scholar]
  28. Haller BC, & Messer PW (2023). SLiM 4: Multispecies eco-evolutionary modeling. The American Naturalist. 10.1086/723601 [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Haller BC, and Messer PW (2016). SLiM: An Evolutionary Simulation Framework. http://benhaller.com/slim/SLiM_Manual.pdf
  30. Hening A, Nguyen DH, & Yin G (2018). Stochastic population growth in spatially heterogeneous environments: the density-dependent case. Journal of Mathematical Biology, 76(3), 697–754. 10.1007/S00285-017-1153-2/FIGURES/1 [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Jones CG, Lawton JH, & Shachak M (1994). Organisms as Ecosystem Engineers. Oikos, 69(3), 373. 10.2307/3545850 [DOI] [Google Scholar]
  32. King CM (1983). The Relationships between Beech (Nothofagus Sp.) Seedfall and Populations of Mice (Mus musculus), and the Demographic and Dietary Responses of Stoats (Mustela erminea), in Three New Zealand Forests. The Journal of Animal Ecology, 52(1), 141. 10.2307/4593 [DOI] [Google Scholar]
  33. Kingman JFC (1982). The coalescent. Stochastic Processes and Their Applications, 13(3), 235–248. 10.1016/0304-4149(82)90011-4 [DOI] [Google Scholar]
  34. Leer B. van, & Powell KG (2010). Introduction to Computational Fluid Dynamics. In Encyclopedia of Aerospace Engineering. John Wiley & Sons, Ltd. 10.1002/9780470686652.EAE048 [DOI] [Google Scholar]
  35. Lotterhos KE (2019). The Effect of Neutral Recombination Variation on Genome Scans for Selection. G3 Genes|Genomes|Genetics, 9(6), 1851–1867. 10.1534/G3.119.400088 [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Lotterhos KE (2023). The paradox of adaptive trait clines with nonclinal patterns in the underlying genes. Proceedings of the National Academy of Sciences of the United States of America, 120(12), e2220313120. 10.1073/PNAS.2220313120/SUPPL_FILE/PNAS.2220313120.SM01.MP4 [DOI] [PMC free article] [PubMed] [Google Scholar]
  37. Lundgren E, & Ralph PL (2019). Are populations like a circuit? Comparing isolation by resistance to a new coalescent-based method. Molecular Ecology Resources, 19(6), 1388–1406. 10.1111/1755-0998.13035 [DOI] [PubMed] [Google Scholar]
  38. Mantyka-Pringle CS, Martin TG, & Rhodes JR (2012). Interactions between climate and habitat loss effects on biodiversity: a systematic review and meta-analysis. Global Change Biology, 18(4), 1239–1252. 10.1111/J.1365-2486.2011.02593.X [DOI] [Google Scholar]
  39. Messer PW, & Petrov DA (2013). Population genomics of rapid adaptation by soft selective sweeps. Trends in Ecology & Evolution, 28(11), 659–669. 10.1016/J.TREE.2013.08.003 [DOI] [PMC free article] [PubMed] [Google Scholar]
  40. Min J, Gupta M, Desai MM, & Weissman DB (2022). Spatial structure alters the site frequency spectrum produced by hitchhiking. Genetics, 222(3). 10.1093/GENETICS/IYAC139 [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Muktupavela RA, Petr M, Ségurel L, Korneliussen T, Novembre J, & Racimo F (2022). Modeling the spatiotemporal spread of beneficial alleles using ancient genomes. ELife, 11. 10.7554/ELIFE.73767 [DOI] [PMC free article] [PubMed] [Google Scholar]
  42. Oberhauser K. Suzanne., Solensky MJ, Journey North., & Monarch Larva Monitoring Project. (2004). Monarch butterfly biology & conservation. Cornell University Press. https://www.cornellpress.cornell.edu/book/9780801441882/the-monarch-butterfly/ [Google Scholar]
  43. Pearse IS, Koenig WD, & Kelly D (2016). Mechanisms of mast seeding: resources, weather, cues, and selection. New Phytologist, 212(3), 546–562. 10.1111/NPH.14114 [DOI] [PubMed] [Google Scholar]
  44. Peterson AT (2003). Predicting the Geography of Species’ Invasions via Ecological Niche Modeling. Https://Doi.Org/10.1086/378926, 78(4), 419–433. 10.1086/378926 [DOI] [PubMed] [Google Scholar]
  45. Pujolar JM (2013). Conclusive evidence for panmixia in the American eel. Molecular Ecology, 22(7), 1761–1762. 10.1111/MEC.12143 [DOI] [PubMed] [Google Scholar]
  46. SC Banks MPASAT (2007). Sex and sociality in a disconnected world: a review of the impacts of habitat fragmentation on animal social interactions. Can J Zool, 85, 1065–1079. [Google Scholar]
  47. Shopska V, Denkova-Kostova R, & Kostov G (2022). Modeling in Brewing—A Review. Processes 2022 , Vol. 10, Page 267, 10(2), 267. 10.3390/PR10020267 [DOI] [Google Scholar]
  48. Statistics New Zealand. (2010). New Zealand Official Yearbook 2010. David Bateman Ltd. https://books.google.com/books/about/New_Zealand_Official_Yearbook_2010.html?id=caPJopKQFqYC [Google Scholar]
  49. Urban MC, Phillips BL, Skelly DK, & Shine R (2008). A toad more traveled: The heterogeneous invasion dynamics of cane toads in Australia. American Naturalist, 171(3), 134–148. 10.1086/527494/ASSET/IMAGES/LARGE/FG4.JPEG [DOI] [PubMed] [Google Scholar]
  50. von Gadow K, Álvarez González JG, Zhang C, Pukkala T, & Zhao X (2021). The Shape and Growth of Forest Trees. In Sustaining Forest Ecosystems (pp. 159–219). Springer International Publishing. 10.1007/978-3-030-58714-7_4 [DOI] [Google Scholar]
  51. Wright S (1931). Evolution in Mendelian Populations. Genetics, 16(2), 97. 10.1093/GENETICS/16.2.97 [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supinfo

Data Availability Statement

The SLiM code for the models used in this manuscript are available at https://doi.org/10.5281/zenodo.13743328 (S. E. Champer et al., 2024). The SLiM simulation software used in the project is available at https://messerlab.org/slim/ or at https://github.com/MesserLab/SLiM. Modelers seeking to develop resource-explicit models based on those presented in this manuscript are invited to ask for support by raising issues on the resource-explicit models GitHub page at https://github.com/MesserLab/ResourceExplicitModels.

RESOURCES