Description Usage Arguments Details Value Examples
Function to calculate currency(-ies) in a given cell. Called by optimLoadCurr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | curr(
L_i,
L_max_i,
n_i,
h_i,
p_i,
f_i,
d_i,
v_i,
beta_i,
H_i,
c_i,
c_f,
whatCurr_i,
mu,
l,
e,
NumFls,
alphaVal,
sumAll = T,
forageType = "random"
)
|
L_i |
Load size (μL) |
L_max_i |
Maximum load size (μL) |
n_i |
Number of foragers in the cell |
h_i |
Handling time per flower (s) |
p_i |
Licking speed for nectar (μL/s) |
f_i |
Flight time between flowers (s) |
d_i |
Distance from hive (m) |
v_i |
Unloaded flight speed from hive (m/s) |
beta_i |
Decrease in flight speed with load (m/sμL) |
H_i |
Time spent inside hive (s) |
c_i |
Cost of non-flying behaviour (J/s) |
c_f |
Cost of flight (J/s) |
whatCurr_i |
Currency to use. Must be either "rat" (net rate) or "eff" (efficiency) |
mu |
Per-flower nectar production (μL/s) |
l |
Maximum standing crop per flower (μL) |
e |
Energetic value of nectar (J/μL) |
NumFls |
Number of flowers per patch |
alphaVal |
Increase in metabolic rate with load (J/(s*μL)) |
sumAll |
Should currencies for the cell be summed? (useful for optimization of L) If not, returns a vector of currencies. |
forageType |
Foraging style (see details below). |
forageType
can be one of the following:
random
: random foraging (Possingham 1988)
nn
: nearest-neighbour foraging
omniscient
: flowers are shared optimally between foragers. Non-saturating nectar production.
random_nonsat
: random foraging with non-saturating nectar production (ceiling at l
).
Summed currency, or vector of currencies
1 2 3 4 5 6 7 8 9 10 11 12 13 | #Parameters
params <- list(L_i=59.5,L_max_i=59.5,n_i=10,h_i=1.5,p_i=1,
f_i=0.86,d_i=100,v_i=7.8,alphaVal=0.013,
beta_i=0.102/59.5,H_i=100,c_f=0.05,c_i=0.0042,
mu=0.3/3600,l=1,e=14.35,NumFls=520*(10^2))
temp1 <- with(params,
curr(L_i,L_max_i,n_i,h_i,p_i,f_i,d_i,v_i,beta_i,H_i,
c_i,c_f,mu,l,e,NumFls,whatCurr_i='eff',sumAll=FALSE,
alphaVal,forageType='omniscient'))
temp1['eff'] #Efficiency within cell
temp1['S'] #Reduction in per-flower value
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.