run_model: run_model

View source: R/run_model.R

run_modelR Documentation

run_model

Description

run_model

Usage

run_model(
  endo_number = 2,
  endo_species = 2,
  parameters = params,
  tmax = 1000,
  eq_threshold = 0.1,
  core_spec = NA,
  kmax = NA
)

Arguments

endo_number

: number of endosymbionts per species within the system

endo_species

: number of endosymbiont species within the system. if 1, model initial states will only start with 1 species.

parameters

: a data frame containing all parameter combinations to run the model on

tmax

: The maximum number of time steps

eq_threshold

: the threshold of variance between different work

core_spec

: If the number of parameter combinations is large it may be wise to assign multiple cores for speed. if NA, number of cores used in process will be set at half the number of cores available for use on the computer.

Value

list containing the details of the model, a data frame of all parameter combinations, and a list of model results for each parameter combination.

Examples

params <- set_parameters(K = 200,lambda = 1,mu = 0.5,betaA =0.001,betaB = 0.001,sigmaA = 0.1, sigmaB = 0.1, sigmaAB = 1, sigmaBA = seq(0, 1, 0.1),nuA = 0.01,nuB = 0.01)
run_model(endo_species = 2, endo_number = 2,parameters = params,tmax = 1000,core_spec = NA)

elishafreedman/bugz documentation built on Feb. 10, 2023, 1:08 p.m.