## What to do

The tasks below are described in a way that assumes everything is in units of DAYS (rate parameters, therefore, have units of inverse days). If any quantity is not given in those units, you need to convert it first (e.g. if it says a week, you need to convert it to 7 days).

### Task 1:

- Set the model parameters such that it corresponds to the following setting:
  - Susceptible S0 = 500, and initially untreated infected host Iu0 = 1. No other infected hosts It0 = 0 and Ir0 = 0.
  - Set simulation duration, tmax, to approximately half a year.
  - Assume that untreated individuals transmit at bu = 0.001, treated at bt = 0.0005, and resistant at br = 0.0008. * Assume that the duration of the infectious period is 5 days for untreated, 4 days for treated and 5 days for resistant (for those individuals, treatment has no effect). Set the rates gi accordingly.
  - Set the number of simulations to 20.
  - Assume nobody receives treatment and no resistance is generated (_f=cu=ct=0).
- With parameters set to correspond to the scenario just described, run the simulation.
- You should see some simulations with outbreaks and some without. For those with outbreaks, you should have around 10-100 susceptible left at the end.

### Task 2:

- With everything as before, set the initial number of untreated infected hosts to 10.
- Run simulations. You should pretty much always get outbreaks. Record the average number of susceptibles left.
- Why do you see almost always outbreaks for this setting and fewer outbreaks/more extinctions for task 1?

### Task 3:

- With the same settings as Task 2 turn on treatment ( f > 0 ).
- Set number of simulations to 50 (the simulations might take a few seconds to run).
- Run the simulation with fraction receiving treatment, f, at 0, 0.25, 0.5, 0.75 and 1.
- Observe what happens to the number susceptibles left at the end of the outbreak as you change treatment levels. Draw conclusions about the usefulness of treatment.

### Task 4:

- Now allow resistance to be generated during treatment (ct > 0).. Set ct = 0.2 for the fraction of resistant generation from treatment.
- Run the simulation for the treatment levels specified in the previous task.
- Observe what happens to the number susceptibles left at the end of the outbreak as you change treatment levels. Draw conclusions about the usefulness of treatment.
- In your head or on a piece of paper, sketch out the relationship between treatment level and the number of susceptibles left at the end in the absence and presence of resistance generation (ct = 0 and ct > 0). What do you conclude from that?

### Task 5:

- Set the rate of transmission for resistant hosts to br = 0.001. Keep untreated hosts and treated host values as before.
- Set resistance generation during treatment to ct = 0.3.
- Keep everything else as previously.
- Contemplate what these changes mean biologically, and what you should expect from the simulations.
- Run the model for each of the 5 treatment levels specified above and record the average number of susceptibles left at the end. * Again, sketch out the relationship between treatment level and the number of susceptibles left at the end and compare to what you found in tasks 3 and 4. What do you conclude from that?

### Task 6:

Keep exploring. For instance, try the following:

- Turn on resistance generation for both treated, ct, and untreated, cu.
- Explore how population size, S0, the fraction of resistance generation ( ct or cu ) and fitness of the different strains ( bt or bu or br ) affect outcomes.
- If you want to explore the relation between treatment level and outbreak size (tasks 3-5) in more detail, you could access the underlying simuation directly and write a bit of R code to loop over treatment values following the “Level 2” example described in the DSAIDE tutorial.