Skip to main content
. Author manuscript; available in PMC: 2019 Feb 1.
Published in final edited form as: Landsc Ecol. 2018 Feb 1;33:197–211. doi: 10.1007/s10980-017-0605-9

Table 2.

HexSim updater functions. These operators are used within accumulate events to modify accumulator values. Suggestions regarding usage illustrate just one of many possible applications.

Name Utility
Accumulator Expression Sets an accumulator equal to an algebraic expression. Standard math operators, accumulators, and global variables may be included.
Accumulator Transfer Transfesr a quantity from one accumulator into another.
Allocated Hexagons Returns the number of hexagons in each individual’s allocated area. Useful for quantifying territory sizes.
Births Returns the number of offspring produced in the most recent reproduction or propagation event.
Clear Sets an accumulator to zero.
Explored Hexagons Returns the number of hexagons in each individual’s explored area. Useful for quantifying home range sizes.
Group Size Returns the number of members present in each individual’s group. Returns zero for floaters.
Group Sum Sets a target accumulator equal to the sum, taken across all group members, of a specified target accumulator. Useful for ascertaining group composition (e.g. is an alpha-male present).
Hexagon Presence Detects the presence of nonzero values in a generated hex-map. Useful for triggering premature model termination (e.g. end a disease simulation if the the pathogen disappears).
Increment Adds a fixed quantity to an accumulator.
Individual ID Returns each individual’s ID. Useful for simulating DNA recombination in two-sex models.
Individual Locations Returns the integer ID of the patch each individual is located within, relative to a user-supplied patch-map.
Mate Verification Sets a mate accumulators to zero if the corresponding mate has died. Assumes the accumulator in question stores mate IDs.
Quantify Environment Returns the sum or mean of the hexagons in each individual’s explored or allocated area, relative to a specified hex-map. Useful for quantifying resource availability, exposure, population density, and many other quantities of interest.
Quantify Extremes Similar to the quantify environment updater function, except the minimum or maximum value is returned.
Quantify Location Returns the floating point score of the hexagon each individual is located within, relative to a user-supplied hex-map.
Resources (Allocated) Returns the percentage of each individual’s resource target that is presently being met by the hexagons in its allocated area.
Resources (Explored) Returns the percentage of each individual’s resource target that is presently being met by the hexagons in its explored area. Is also used to simulate resource competition between populations.
Stochastic Increment Increments an accumulator by an amount drawn from a uniform distribution with user-supplied bounds.
Stochastic Trigger Returns a 1 with probability p (specified by the user) and a 0 with probability 1-p. A single evaluation is made and then applies to every individual. Used to randomly trigger life history events.
Subpopulation Assign Randomly selects a user-specified number of individuals from a population, and assigns them a specific accumulator value. Useful for operating on a subset of a population.
Subpopulation Selector Non-randomly selects a user-specified number of individuals from each group, and sets their target accumulator to 1. Useful for maintaining alpha status in wolf packs after mortality events.
Time Step Returns the current time step, but includes a modulus operator. Useful as input to data lookup life history events.
Trait Value Index Returns the index value of probabilistic, genetic, or genetic accumulated traits. Provides a way for individuals to incorporate this trait information into accumulator mathematics or generated hex-map construction.
Uptake Transfers a quantity from a hex-map into an accumulator. Individual allocated areas define the source region. Useful for modeling the transfer of pathogens from the environment into organisms.