The model description follows the ODD (Overview, Design concepts, Details) protocol for describing individual- and agent-based models (Grimm et al. 2006), as updated by Grimm et al. (2020).

1 Purpose and Patterns

1.1 Purpose

The proximate purpose of this model is to accurately predict changes in African savanna elephant (Loxodonta africana) movement patterns after the decommissioning (i.e., partial or full removal) of veterinary fences. Veterinary fences, built to mitigate livestock disease risk, heavily restrict wildlife movements in southern Africa; the ultimate purpose of this work is to facilitate policymakers’ decisions to decommission fences by providing insight on savanna elephant movement changes pre- and post-decommissioning.

1.2 Patterns

We aim to replicate four patterns seen in location data from savanna elephants fitted with GPS-enabled collars, 42 in Namibia and XX in Botswana. These patterns can be divided into two spatial patterns and two temporal patterns. These patterns are represented in Figure Xa and b, respectively. TBD: These figures have yet to be made!

1.2.1 Spatial Patterns

  1. Channeling along linear features. There are several linear features included on the southern African savanna landscape. Savanna elephant often channel their movement along veterinary fences and along dry riverbeds, likely due to searching for crossing points in the former and an increased ease of movement for the latter.
  2. Differential permeability of linear features. Linear boundaries may be crossed, but those crossing rates depend on (i) the type of linear feature, and (ii) the sex of the elephant (bull vs. cow). In general, elephant are most likely to cross rivers and least likely to cross veterinary fences. In addition, while bull elephants (males) often break through fences to continue in their direction of travel, cows (females) heavily avoid crossing fences. This is likely because even downed fences often still have steel cables stretched across the opening, and the juveniles and calves traveling with the GPS-collared cows cannot cross these cables. Crossing rates for linear features by feature type and elephant sex are given in Figure 1.
**Figure 1. Linear feature crossing rates figure and table.** (left) A chart of crossing rates for three barrier types for males and females. (right) Table elements are the proportion (%) of time that a barrier was crossed when an elephant came within 1km of that barrier. Rates are given by feature type and elephant sex, with values adapted from [Naidoo et al 2022](https://www.frontiersin.org/articles/10.3389/fcosc.2022.788133/full).

Figure 1. Linear feature crossing rates figure and table. (left) A chart of crossing rates for three barrier types for males and females. (right) Table elements are the proportion (%) of time that a barrier was crossed when an elephant came within 1km of that barrier. Rates are given by feature type and elephant sex, with values adapted from Naidoo et al 2022.

1.2.2 Temporal Patterns

  1. Wet season movement increases. During the wet season, elephant forage on flush vegetation, traveling farther in a single day than during the dry season, when they are restricted to areas near rivers and waterholes.
  2. Daily drinking. Elephant must drink daily, especially during the dry season when there is little water on the landscape or in vegetation. Because of this behavior, water sources pose a greater attraction in the dry season than the wet season, as elephant return daily to rivers and established waterholes.

2 Entities, state variables, and scales

2.1 Entities

Model entities are individual agents (African savanna elephant L. africana); linear features (rivers, roads, fences); point features (natural waterholes and artificial waterholes); and raster features (burn time, distance from human settlement, habitat type, vegetation index, distance from water). Physical characteristics of the agents, linear and point features are static in time, but raster features may change temporally.

Table 2. Model entities. Description
Entity Description
Elephant African savanna elephant are the focus of our model.
Environment The physical landscape perceived by the agent.
Barrier Elephant often encounter linear features on the landscape which must be treated separately from environmental grid cells.
Waterhole Elephant drink daily, and so often rely on artificial waterholes across the landscape in Khaudum National Park.
Step Parameters Step selection is determined by four hyperparameters (two for step length, two for turning angle), which are selected based on the time of year and agent activity state and sex.

2.2 State variables

Table 3. Entity attributes Characteristics of individual entities in the model.
Entity Attribute Description Values And Type Spatial Scale Temporal Scale
Elephant Sex Sex of elephant, which also indirectly indicates group status (solitary male or female in herds with juveniles) categorical [“male”, “female”] Static
Activity State Current activity state of the elephant. This state is randomly selected and defined using a Hidden Markov Model. categorical [“resting”, “foraging”, “exploring”] Hourly
Location Current location of the elephant. lon-lat Hourly
Step Options List A set of \(q\) possible next steps for the elephant to take, as well as environmental weights. a \(q\)-length list of lon-lat and weights (0,1) Hourly
Environment Season African savanna processes are highly dependent on season – during the wet season, rains flush the landscape and allow elephant to travel far from permanent water sources; during the dry season, elephant movements are restricted categorical [“wet”, “dry”] Seasonal
Hour of day GPS data points for elephant movement are given on the hourly scale, so our simulation models agent steps on an hourly scale ordinal [1-24] Hourly
Enhanced Vegetation Index The Landsat EVI is an indicator of vegetative productivity on the landscape numeric (-1.0, 1.0) 30m Monthly
Fire incidence MODIS Burned Area Product - whether pixel has burned in the past month. binary TRUE/FALSE 250m Monthly
Elevation Elevation above sea level (USGS SRTM DEM) numeric (0 – 3,000) meters 30m Static
Landcover KAZA Landcover 2021 (WWF based on Sentinel data) categorical [“closed”, “open”, “sparse”] 10m Static
Distance from human settlements Distance from nearest pixel on World Settlement Footprint 2019 (based on Sentinel data) numeric (0 – 7,500) meters 10m Static
Distance from water Distance from nearest water source (waterhole or river); this can change by season as waterholes fill up or dry out. numeric (0 – 7,500) meters 10m Seasonal
Barrier Type Several types of linear barriers influence elephant movement. categorical [“fence”, “river”, “road”] Static
Permeability The permeability of a barrier is determined by the barrier type and the sex of the agent encountering the barrier. A barrier with a permeability of 1 does not affect agent movement at all; a barrier of permeability 0 allows no movement. numeric [0-1] (probability) Static
Step Parameters Hyperparameters Hyperparameters (\(\mu_s\) and \(\sigma_s\) for step length; \(\mu_t\) and \(\kappa_t\) [concentration] for turning angle) are updated based on the agent’s current activity state. numeric: \(\mu_s\) (0, 5000); \(\sigma_s\) (0, 5000); \(\mu_t\) (\(-2\pi\), \(2\pi\)); \(\kappa_t\) (0, 1) Hourly
Hyperparameter Options Table A table of hyperparameter options (one set for each activity state) is updated by season, as elephant generally move differently in the wet season than the dry season. a list of three sets of hyperparameters, one for each activity state Seasonal

2.3 Scales and extents

Spatial and temporal scales are given in Table 3. The spatial extent of our model is the Kavango-Zambezi Transfrontier Conservation Area in central southern Africa. The temporal extent of our model is 2012-2022.

3 Process Overview and Scheduling

The processes in our ABM are executed on different temporal scales. The outer process (“Temporal Assignment Wrapper”) executes on a monthly basis, while the inner process (“Agent-Based Model”) executes on an hourly basis. The outer TAW chains together several inner ABM processes, updating the environment and step selection parameters before running each ABM. Within each ABM, a third process (“Step Drawing and Barrier Handling”) compares each possible next step against linear barriers and accepts or rejects possible barrier crossings based on each barrier’s permeability.

Figure 1. Process Map. A map of the three main processes within this project
Figure 1. Process Map. A map of the three main processes within this project

3.1 Temporal Assignment Wrapper (Monthly)

This wrapper schedule is executed once per “month”.

  1. The environment updates its month to the next consecutive month.
  2. The environment updates its season state variable, if necessary. The “wet” season is defined October-April, and “dry” season May-September.
  3. The environment updates all monthly and seasonal state variables: Enhanced Vegetation Index, fire incidence, and distance from water (as waterholes fill up and dry out).
  4. The step entity updates its hyperparameter options table state variable based on the season.
  5. This process passes these parameters, as well as the final location from the previous ABM run in the chain, to the hourly ABM simulation.

3.2 Agent-Based Model (Hourly)

This main model schedule is executed once per “hour”.

  1. The agent updates its activity state characteristic, selected randomly from “resting”, “foraging”, or “exploring”.
  2. The step parameters entity updates its hyperparameters (\(\mu_s\) and \(\sigma_s\) for step length; \(\mu_t\) and \(\kappa_t\) for turning angle) based on the agent’s current activity state.
  3. This process passes these hyperparameters to the Step Drawing & Barrier Handling process, which updates the agent’s step options list of possible next steps.
  4. The agent updates the weights of its step options list based on the current environment and distance from waterhole points at each step option.
  5. The agent randomly selects a next step to take.

3.3 Step Drawing & Barrier Handling (\(q\) substeps)

This sub-model schedule is executed until \(q\) viable steps are selected, or until 5000 attempts are made.

  1. Using the hyperparameters passed by the main ABM process, this process updates one item of the agent’s step options list with a step length and turning angle randomly selected from a Gamma distribution and a von Mises distribution, respectively.
  2. The processes then checks the proposed step against the barrier entity’s list of barriers.
  3. For each barrier that the proposed step crosses, this process draws a random (uniformly-distributed) number \(X\) between 0 and 1.
  4. The process then compares this number to the permeability (\(p_b\)) state variable of the selected barrier. If \(X\leq p_b\), the proposed step is selected. If \(X>p_b\), then the proposed step is rejected.

4 Basic principles

The next few sections are under construction!

4.1 Emergence

4.2 Adaptation

4.3 Objectives

4.4 Learning

4.5 Prediction

4.6 Sensing

4.7 Interaction

4.8 Stochasticity

4.9 Collectives

4.10 Observation

5 Initialization

6 Input data

7 Submodels

7.1 Submodel 1: Temporal Assignment Wrapper

The TAW is the code governing the long-term trends of landscape change. Given the overall simulation time period as an input, the program compiles a list of spatial data for each of m months in the simulation. The initial position x0 of the agent is randomly selected on the landscape and fed into the ABS process (outlined below) for \(n\) iterations corresponding to the number of hours in the current month \(m\). Then, the output of \(ABS_{m}\) (simulated hourly movement data for the month \(m\)) is saved and the spatial raster data updated to the new month m+1. The final step of \(ABS_{m}\), \(x_m\), is used as the new \(x_0\) for \(ABS_{m+1}\). The TAW continues in this pattern until the entire simulation is run.

7.2 Submodel 2: Agent-Based Simulation

The ABS is the core functionality of this project, written in C++. For each iteration i of n total iterations, the program begins with a current location \(x_0\) and randomly selects a behavioral state \(s_i\). If the behavioral state has been updated (\(s_i\neq s_{i+1}\)), the agent selects a new long-term destination. The program then selects parameters to define the Gamma and von Mises distributions for step length and turning angle, respectively, based on the chosen behavioral state \(s_i\).

The program then randomly draws pairs of turning angles and step lengths from these distributions (based on \(s_i\)) using the SDBH process (outlined below) until the program reaches a user-supplied q number of viable pairs, or until 5000 attempts are made. Once all q pairs have been drawn (detailed in the sub-process below), the model then assigns a weight (\(w_j\)) to each pair based on the environmental raster supplied, the distance to the selected long-term destination, and distance from any supplied avoidance points. Finally, step \(x_i\) is selected randomly given these weights, and the program is run again for iteration \(i+1\), with location \(x_0=x_i\) as the starting point.

7.3 Submodel 3: Step Drawing and Barrier Handling

The SDBH is a sub-process used in the ABS to properly sample barrier crossings by agents based on each barrier’s permeability, \(p_b\), supplied by the user. This process is written in C++.

For each line \(j\) between the current location \(x_i\) and a potential new location \(x'_{i+1}\), the program checks whether line \(j\) will cross any linear barrier. If there is a potential crossing, for each barrier \(b\) (of those potentially crossed), a random number \(P_j\) is drawn and compared to the barrier’s inherent probability of crossing. If \(P_j > p_b\), the new location \(x'_{i+1}\) is rejected and a new one selected. This process continues until \(q\) viable pairs are selected, or until 5000 attempts are made.