moveForagers: Move foragers from one cell to another, and re-calculate L,...

Description Usage Arguments Value Examples

View source: R/moveForagers.R

Description

moveForagers moves foragers from one cell to another, and re-calculates L, S, and curr.

Usage

1
moveForagers(scenarioSet, moves)

Arguments

scenarioSet

Scenario set list, containing best, base, and worst scenarios (worst is NA for solitary foragers)

moves

Move list from whichMoves, telling which cells to move from and to.

Value

Updated scenario set list

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#Create scenario
nests<-list(nest1=list(xloc=1,yloc=1,n=matrix(c(5,10,15),1),
                    whatCurr="eff",sol=T,
                    eps=0,L_max=59.5,v=7.8,
                    beta=0.102/59.5,p_i=1,
                    h=matrix(rep(1.5,3),1),
                    c_f=0.05,c_i=0.0042,
                    H=100,d=matrix(c(50,100,150),1),
                    L=matrix(rep(59.5,3),1),
                    curr=matrix(c(5,10,15),1),
                    steps=5,stepNum=1))

world<-list(mu=matrix(rep(8.33e-05,3),1),
         flDens=matrix(rep(520,3),1),
         e=matrix(rep(14.3,3),1),
         l=matrix(rep(1,3),1),
         f=matrix(rep(0.86,3),1),
         cellSize=10,patchLev=FALSE,
         S=matrix(rep(1,3),1),
         forageType='random')

baseScen=list(nests=nests,world=world) #Baseline scenario

samuelVJrobinson/CPForage documentation built on Jan. 20, 2021, 6:22 p.m.