getCurr: Get currency (or currencies)

Description Usage Arguments Value Examples

View source: R/getCurr.R

Description

Function to calculate currency (or currencies) in a given cell. Called by curr to return nest-specific currency.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
getCurr(
  whatCurr,
  L,
  L_max,
  e,
  d,
  v,
  h,
  f,
  l,
  p_i,
  c_i,
  c_f,
  H,
  alphaVal,
  betaVal,
  S
)

Arguments

whatCurr

Currency to use. Must be either "rat" (net rate) or "eff" (efficiency)

L

Load size (μL)

L_max

Maximum load size (μL)

e

Energetic value of nectar (J/μL)

d

Distance from hive (m)

v

Unloaded flight speed from hive (m/s)

h

Handling time per flower (s)

f

Flight time between flowers (s)

l

Maximum standing crop per flower (μL)

p_i

Licking speed for nectar (μL/s)

c_i

Cost of non-flying behaviour (J/s)

c_f

Cost of flight (J/s)

H

Time spent inside hive (s)

alphaVal

Increase in metabolic rate with load (J/(s*μL))

betaVal

Decrease in flight speed with load (m/sμL)

S

Competition term (0-1)

Value

Currency, or vector of currencies

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#Parameters
params=list(L=59.5,
L_max=59.5,
e=14,
d=100,
v=7.8,
h=1.5,
f=0.86,
l=1,
p_i=1,
c_i=0.0042,
c_f=0.05,
H=100,
alphaVal=0.013,
betaVal=0.102/59.5)

with(params,getCurr(whatCurr='rat',L,L_max,e,d,v,h,f,
           l,p_i,c_i,c_f,H,betaVal,S=1))
with(params,getCurr(whatCurr='rat',L,L_max,e,d,v,h,f,
           l,p_i,c_i,c_f,H,betaVal,S=0.5))

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