distanceForager-class: dForager Constructor

distanceForager-classR Documentation

dForager Constructor

Description

Constructor function for distance Forager class objects. Obects of this class behave exactly like forager class objects, but when selecting a target, distance foragers prefer closer targets, discounting targets probability of selection by the cube of their distance

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

Methods

tSelect(choices)

calculates probablilites and selects a target from a list of options but DOES NOT set the target (use setTarget for this, which calls tSelect).


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