run_sim: Run demographic simulation

Description Usage Arguments Value

View source: R/simulate.R

Description

Run the simulation. Currently, it runs all time steps, but for the economic model, the structure will need to be slightly adjusted to run a single time step. The initialization is separated from this function for that reason.

Usage

1
2
3
run_sim(ngrid, ncell, g.p, lc.df, sdd, N.init, control.p, verbose = TRUE,
  save_yrs = NULL, K_max = NULL, dem_out = TRUE,
  collapse_LCs = TRUE)

Arguments

ngrid

Number of grid cells in entire map

ncell

Number of inbound grid cells

g.p

Named list of global parameters set with set_g_p

lc.df

Dataframe or tibble with xy coords, land cover proportions, and cell id info

sdd

Output with short distance dispersal neighborhoods created by sdd_set_probs

N.init

Matrix or array with initial population sizes created by pop_init

control.p

NULL or named list of buckthorn control treatment parameters set with set_control_p

verbose

TRUE Show progress bar?

save_yrs

NULL Vector of years to save; if NULL, all years are returned

K_max

NULL Maximum carrying capacity to avoid memory overloads

dem_out

TRUE Store nFl, nSd, nSdStay, D?

collapse_LCs

TRUE Sum abundances within each cell?

Value

Array N of abundances for each cell and age group, matrix B of seed bank abundances, matrix nFl with number of flowering individuals, matrix nSd of total seeds produced in each cell, matrix nSdStay of total seeds remaining in each cell, and matrix D of immigrants into each cell.


Sz-Tim/gbPopMod documentation built on Dec. 7, 2020, 1:07 p.m.