sim_experiments: Deterministic simulations of multiple fields of aphids and...

View source: R/simulate.R

sim_experimentsR Documentation

Deterministic simulations of multiple fields of aphids and wasps.

Description

Deterministic simulations of multiple fields of aphids and wasps.

Usage

sim_experiments(
  clonal_lines,
  n_fields = 2,
  max_t = 250,
  K = 12500,
  alate_b0 = -5,
  alate_b1 = 0.0022,
  alate_field_disp_p = 0.1,
  K_y_mult = 1/1.57,
  s_y = populations$s_y,
  a = wasp_attack$a,
  k = wasp_attack$k,
  h = wasp_attack$h,
  rel_attack = wasp_attack$rel_attack,
  wasp_density_0 = c(3, 0),
  wasp_delay = 8,
  wasp_disp_m0 = 0,
  wasp_disp_m1 = 0,
  wasp_field_attract = 1,
  constant_wasps = FALSE,
  mum_smooth = 0.4,
  pred_rate = 0.1,
  extinct_N = 1,
  sep_adults = FALSE,
  save_every = 1,
  perturb = NULL,
  show_progress = FALSE
)

Arguments

clonal_lines

A multiAphid object containing the aphid-line-specific info for all the lines in the simulations. Each object in the multiAphid is an aphid object that results from the clonal_line function. Combine them using c(aphid_obj1, aphid_obj2).

n_fields

The number of fields to simulate. Wasps operate at the field level, whereas aphids operate at the plant level. Both wasps and aphids operate separately across fields but can be connected via dispersal (see arguments wasp_disp_m0, wasp_disp_m1, and alate_field_disp_p). Defaults to 2.

max_t

How many days to simulate. Defaults to 250.

K

Aphid density dependence. Defaults to 12.5e3 because this caused simulations to approximately match experiments.

alate_b0

The proportion of offspring from apterous aphids is inv_logit(alate_b0 + alate_b1 * N) where N is the total number of aphids on that plant. Defaults to -5.

alate_b1

The proportion of offspring from apterous aphids is inv_logit(alate_b0 + alate_b1 * N) where N is the total number of aphids on that plant. Defaults to 0.0022, which makes alate production only mildly density dependent.

alate_field_disp_p

Proportion of alates from each field that are added to the dispersal pool. After adding alates to the pool, they are then evenly distributed to all fields. This happens only on days indicated by plant_check_gaps. Defaults to 0.1.

K_y_mult

The number multiplied by K to get density dependence for parasitized aphids. Defaults to 1 / 1.57, which is from Meisner et al. (2014).

s_y

Daily survival rate of adult wasps. Defaults to populations$s_y, which is from Meisner et al. (2014).

a

Parasitoid attack rate. Defaults to the internal object wasp_attack$a, which is from Meisner et al. (2014).

k

Aggregation parameter of the negative binomial distribution. Defaults to the internal object wasp_attack$k, which is from Meisner et al. (2014).

h

Parasitoid handling time. Defaults to the internal object wasp_attack$h, which is from Meisner et al. (2014).

rel_attack

Relative parasitoid attack rate among instars. Defaults to wasp_attack$rel_attack, which is from Meisner et al. (2014).

wasp_density_0

Starting adult wasp density. Must be a single number or a n_fields-length vector. Defaults to c(3, 0).

wasp_delay

Delay in days between when the aphids start and the wasps are added. This can be a single integer or a n_fields-length vector. Defaults to 8.

wasp_disp_m0

Proportion of adult wasps from each field that are added to the dispersal pool when there are no aphids present. After adding wasps to the pool, they are then evenly distributed to all fields. This happens only on days indicated by plant_check_gaps. Defaults to 0.

wasp_disp_m1

Effect of aphid density on wasp emigration from a patch. Emigration is wasp_disp_m0 * exp(-wasp_disp_m1 * log(z)), where z is the total number of living aphids in the patch. Defaults to 0.

wasp_field_attract

Relatively attractiveness of fields to wasps. This affects the proportion of wasps that immigrate from the dispersal pool to each field. It doesn't change the number of wasps that leave fields. This can be a single numeric or a numeric vector of length n_fields. If a single numeric is provided, all fields are equally attractive to wasps. If a vector is provided, then the vector is divided by its sum (to make it sum to 1), then those values are used as the proportion of wasps from the dispersal pool that immigrate to each field. Defaults to 1.

constant_wasps

Logical for whether to keep adult wasps at the same density throughout simulations. This can be a single logical or a n_fields-length vector. Defaults to FALSE.

mum_smooth

Proportion of mummies that will NOT take exactly 3 days to develop. As this value approaches 2/3, it will provide greater smoothing of wasp numbers through time. Defaults to 0.4.

pred_rate

Daily predation rate on aphids and mummies. Defaults to 0.1 to compensate for losses from plants dying.

extinct_N

Threshold below which a line is considered extinct. Defaults to 1.

save_every

Abundances will be stored every save_every time points. Defaults to 1.

perturb

Information for perturbing populations in the simulations. It should be a dataframe with 4 columns: * when: Integers indicating at what timepoint(s) to do the perturbations. These can be repeated if you want to perturb multiple things at the same time. * where: What field to do the perturbations in. * who: Which population to perturb. This can be a character vector where values must be the name of an aphid line, "wasps", or "mummies". It can also be an integer vector where, for n aphid lines, values ⁠<= n⁠ indicate an aphid line, values ⁠== n+1⁠ indicate mummies, and values ⁠== n+2⁠ indicate adult wasps. Note that perturbing the mummy population also perturbs the still-living but parasitized aphids, too. * how: Numbers ⁠>= 0⁠ that are multiplied by the desired population to cause the perturbation.

show_progress

Boolean for whether to show progress bar. Defaults to FALSE.


lucasnell/clonewars documentation built on Oct. 12, 2023, 4:39 p.m.