brwForager-class: brwForager constructor

brwForager-classR Documentation

brwForager constructor

Description

Constructor function for a Biased Random Walk Forager class objects. Objects of this class have methods for finding targets, moving, and plotting. Movement switches between a biased random walk (with step lengths drawn from a gamma distribution and bearing drawn from a wrapped cauchy) and directed motion toward a target (retaining concentration, but not bias)

Fields

location

a simple features collection with a single POINT class object

bearing

a numeric that gives the current bearing in radians. Default starting bearing is drawn from random uniform circular distribution

speed

a numeric value that gives the scale parameter of the gamma distribution from which step lengths are draw. Because the shape parameter of this distribution is set to 1, the speed variable will equal the average step length

sight

a numeric giving the distance at which the forager object can detect patches when in an environment

path

a simple features collection with a single multipoint object containing previous locations of the forager. Usually objects are created with default multipoint objects containing only the initial location

visitSeq

a character vector with the names (in order) of all patches visited. Must start with NAs equal in number to to the repeatAvoid variable (this is done by default if no value is given)

targeting

a logical giving which mode of movement the forager is in. Initial value usually uses default "FALSE"

repeatAvoid

numeric giving the number of different patches a forager must visit before targeting a recently visited patch again

target

a simple feature data frame with a single row containing the target patch location and values

turnBias

a numeric giving the radians from which the center of the wrapped cauchy distribution from which new bearings are drawn should be shifted from the previous bearing.

concentration

a numeric between 0 and one which gives the concentration of the wrapped cauchy distribution from which new bearings are drawn, where a 1 results in a turning angle equal to turnBias every step and a 0 results in a circular random uniform probability distribution

persistence

a numeric between 0 and 1 which weights the value of last step direction relative to the direction of a target when selecting new bearing

Methods

move(bounds = NA)

moves the forager using rules given in class description. Updates relevant fields including location, bearing, visitSeq, bearing, targetting, and path


aqvining/Foraging-Simulator documentation built on Nov. 19, 2022, 5:43 p.m.