run_sim: run flexible simulation of population and resistance change...

Description Usage Arguments Value Examples

Description

some params driven by config file, others by function args

Usage

1
2
3
4
run_sim(num_tsteps = 20, pop_start = 0.5, resist_freq_start = 0.01,
  resist_intensity_start = 1, resist_mech = "metabolic", survival = 0.7,
  emergence = 0.3, insecticide_kill = 0.8, resistance_modifier = 1,
  resist_incr = 0.2, resist_decr = 0.1, l_config = NULL, randomness = 0)

Arguments

num_tsteps

number of timesteps to run simulation

pop_start

start vector population

resist_freq_start

frequency of resistance at start, 0 to 1

resist_intensity_start

intensity of resistance at start, 1 to 10

survival

adult survival rate

emergence

emerging adults, can be a vector can be greater than 1

insecticide_kill

kill rate due to insecticide

resistance_modifier

modifies effect of resistance

resist_incr

increase in resistance when correct insecticide present

resist_decr

decrease in resistance when correct insecticide absent

l_config

list of config parameters

randomness

0-1 0=none, 1=maximum

Value

list of simulation results

Examples

1
2
3
4
5
6
7
8
9
l_time <- run_sim(pop_start=0.5, resist_freq_start=0.2, survival=0.8, emergence=0.2, insecticide_kill=0.4, resistance_modifier=1)
#plot default run
plot_sim( run_sim())
#modify params
plot_sim( run_sim( insecticide_kill = 0.3, resist_incr = 0.05 ))
#modify config file
l_config <- read_config()
l_config2 <- config_plan(l_config, t_strt=c(1,11), t_stop=c(10,20), control_id=c('irs_pyr','irs_ddt'))
plot_sim( run_sim(l_config=l_config2, resist_incr=0.1))

AndySouth/resistanceGame documentation built on May 5, 2019, 6:01 a.m.