Skip to content

Commit

Permalink
Document and make suggested changes to carrying capacity vignette for…
Browse files Browse the repository at this point in the history
… clarity
  • Loading branch information
pwinskill committed Dec 4, 2023
1 parent 5f174c4 commit a109246
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion R/variables.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' @title Define model variables #' @description
#' @title Define model variables
#' @description
#' create_variables creates the human and mosquito variables for
#' the model. Variables are used to track real data for each individual over
#' time, they are read and updated by processes
Expand Down
7 changes: 4 additions & 3 deletions man/set_carrying_capacity.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions vignettes/Carrying-capacity.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ lines(s_seasonal$pfpr ~ s_seasonal$timestep, col = "darkorchid3")
## Custom modification of the mosquito carrying capacity

In malariasimulation, we can also modify the carrying capacity over time in a more
bespoke manner. We can use the `set_carrying_capacity()` helper function to provide
scalers to modify the species-specific carrying capacity values at given time points.
This allows us to model a number of useful things:
bespoke manner. We can use the `set_carrying_capacity()` helper function to
specify scalars that modify the species-specific carrying capacity through time,
relative to the baseline carrying capacity, at defined time steps. The baseline
carrying capacity is generated when calling `set_equilibrium()`, to match the
specified EIR and population size.

This functionality allows us to model a number of useful things:

### Larval source management

Expand Down Expand Up @@ -116,7 +120,7 @@ abline(v = 365, lty = 2, col = "grey60")
### Invasive species

An invasive species may exploit a new niche, increase the carrying
capacity at the point of invasion. The functions
capacity at the point of invasion. The function
`set_carrying_capacity()` gives complete freedom to allow
changes to the carrying capacity to be made. Here
we will demonstrate using carrying capacity rescaling to capture the
Expand Down

0 comments on commit a109246

Please sign in to comment.