Skip to content

Commit

Permalink
Removed overhanging changes associated with EIR calculation correctio…
Browse files Browse the repository at this point in the history
…n from another PR.
  • Loading branch information
RJSheppard committed May 8, 2024
1 parent b9b923c commit 1a70ff2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 3 additions & 1 deletion R/biting_process.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ simulate_bites <- function(
calculate_eir <- function(species, solvers, variables, parameters, timestep) {
a <- human_blood_meal_rate(species, variables, parameters, timestep)
infectious <- calculate_infectious(species, solvers, variables, parameters)
infectious * a
age <- get_age(variables$birth$get_values(), timestep)
psi <- unique_biting_rate(age, parameters)
infectious * a * mean(psi)
}

effective_biting_rates <- function(a, .pi, p_bitten) {
Expand Down
10 changes: 2 additions & 8 deletions tests/testthat/test-biology.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ test_that('total_M and EIR functions are consistent with equilibrium EIR', {
})

expect_equal(
actual_EIR * 0.766,
# 0.766 is the population average psi under an exponential pop distribution
# There's possibly a better way of calculating this, depending on what exactly
# we're testing here, e.g., we could remove lines 19-21 and omega from line 22
actual_EIR,
expected_EIR,
tolerance = 1e-2
)
Expand Down Expand Up @@ -54,10 +51,7 @@ test_that('total_M and EIR functions are consistent with equilibrium EIR (with h
})

expect_equal(
actual_EIR * 0.766,
# 0.766 is the population average psi under an exponential pop distribution
# There's possibly a better way of calculating this, depending on what exactly
# we're testing here, e.g., we could remove lines 49-51 and omega from line 52
actual_EIR,
expected_EIR,
tolerance = 1e-2
)
Expand Down

0 comments on commit 1a70ff2

Please sign in to comment.