This document demonstrates how annual scenarios for vector populations and resistance can be generated from a few simple equations.

The game will modify input parameters to generate reasonable scenarios. The input parameters are simply a means to generate reasonable scenarios.

In the following plots time in days is represented on the x axis, the top panel shows insecticide use, the middle panel shows vector population and the lower panel shows resistance (phenotypic).

The code included is there merely to show us as developers how the scenarios were generated.

For an interactive version of the equations used to generate these plots see https://andysouth.shinyapps.io/shinyGame4.

#### load required packages
require(resistanceGame)

\newpage

scenario 1 : no insecticide use

plot_sim( run_sim(num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 2 : continuous pyr use in presence of resistance

l_config <- read_config()
l_config2 <- config_plan(l_config, t_strt=1, t_stop=360, control_id='irs_pyr')
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 3 : continuous use of ops with no resistance

l_config2 <- config_plan(l_config, t_strt=1, t_stop=360, control_id='irs_ops')
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 4 : pyr used for 6 months

l_config2 <- config_plan(l_config, t_strt=1, t_stop=180,
                            control_id='irs_pyr')
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 5 : ops for 6 months

l_config2 <- config_plan(l_config, t_strt=1, t_stop=180, control_id=c('irs_ops'))
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 6 : 6 months pyr, 6 months ops

l_config2 <- config_plan(l_config, t_strt=c(1,181), t_stop=c(180,360),
                            control_id=c('irs_pyr','irs_ops'))
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 7 : 6 months pyr, 6 months ddt

l_config2 <- config_plan(l_config, t_strt=c(1,181), t_stop=c(180,360),
                            control_id=c('irs_pyr','irs_ddt'))
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 8 : no insecticide use, 50% randomness added

plot_sim( run_sim(randomness=0.5, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 9 : same as previous but just a different randomisation

plot_sim( run_sim(randomness=0.5, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 10 : no insecticide use, 10% randomness added

plot_sim( run_sim(randomness=0.1, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 11 : continuous pyr use, resistance_modifier < 1 decreases effect of resistance

l_config2 <- config_plan(l_config, t_strt=1, t_stop=360, control_id='irs_pyr')
plot_sim( run_sim(l_config=l_config2, resistance_modifier=0.1, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 12 : continuous pyr use, resistance_modifier > 1 increases effect of resistance

plot_sim( run_sim(l_config=l_config2, resistance_modifier=10, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 13 : set a different control and resistance mechanism and control plan

l_config2 <- config_controls(l_config, control_id='new_ai', vector_id='an_gamb',
                             control_kill_rate=0.4)
l_config2 <- config_resistances(l_config2, control_id='new_ai', resistance_id="target_site",
                                resistance_strength=0.8,
                                resistance_incr=0.2,
                                resistance_decr=0.1)
l_config2 <- config_plan(l_config2, t_strt=1, t_stop=360, control_id='new_ai')
plot_sim( run_sim(l_config=l_config2, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01) )

\newpage

scenario 14 : change emergence over time (6 tstep(month) cycle).

emergence = c(rep(0.3,180),rep(0,180))
plot_sim( run_sim(emergence=emergence, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01), plot_emergence=TRUE )

\newpage

scenario 15 : emergence gradual change.

#sin curve to create a gradual change from 0 to 0.3
emergence = 0.3*sin(seq(0,3.1,0.01))
plot_sim( run_sim(emergence=emergence, num_tsteps=360, resist_incr=0.02, resist_decr = 0.01), plot_emergence=TRUE )

\newpage

scenario 16 : emergence annual pattern of monthly values, daily time step

emergence = c(rep(0.3,180),rep(0,180))
plot_sim( run_sim(num_tsteps=360,emergence=emergence, survival=0.7,
                  resist_incr=0.02, resist_decr = 0.01), 
          plot_emergence=TRUE )

\newpage

scenario 17 : as previous, with control

emergence = c(rep(0.3,180),rep(0,180))
l_config2 <- config_plan(l_config, t_strt=c(1,181), t_stop=c(180,360),
                         control_id=c('irs_ops','irs_pyr'))
plot_sim( run_sim(l_config=l_config2, 
                  num_tsteps=360, emergence=emergence, survival=0.7,
                  resist_incr=0.02, resist_decr = 0.01), 
          plot_emergence=TRUE )

\newpage

How controls and resistance mechanisms can be specified.

Our generic approach allows us to specify any combination of controls and resistance mechanisms. The controls cause a specified kill rate(s) on specified vector(s). The resistance mechanisms specify which controls they apply to and how fast resistance increases and decreases in the presence and absence respectively of that control. Cross resistance can be specified simply by specifiying multiple controls for one resistance mechanism.

The relationships between vectors, controls and resistance mechanisms are specified in simple configuration files. Here is a simple example of a collection of such configuration files :

places.csv

places <- read.csv( system.file('extdata','config1','places.csv', package='resistanceGame'))
print(places) 

vectors.csv

vectors <- read.csv( system.file('extdata','config1','vectors.csv', package='resistanceGame'))
print(vectors)

controls.csv

controls <- read.csv( system.file('extdata','config1','controls.csv', package='resistanceGame'))
print(controls)

resistances.csv

resistances <- read.csv( system.file('extdata','config1','resistances.csv', package='resistanceGame'))
print(resistances)

control_plan.csv

control_plan <- read.csv( system.file('extdata','config1','control_plan.csv', package='resistanceGame'))
print(control_plan)


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