Type: | Package |
Title: | Mosquito Control Resource Optimization |
Version: | 0.1.0 |
Description: | This project aims to make an accessible model for mosquito control resource optimization. The model uses data provided by users to estimate the mosquito populations in the sampling area for the sampling time period, and the optimal time to apply a treatment or multiple treatments. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
Suggests: | knitr, rmarkdown, testthat |
VignetteBuilder: | knitr |
RoxygenNote: | 7.0.2 |
Imports: | magrittr, assertthat, pracma, NlcOptim, nloptr, sfsmisc |
NeedsCompilation: | no |
Packaged: | 2020-08-03 14:40:15 UTC; travisbyrum |
Author: | Jeff Demers [aut], Anshuman Swain [aut], Travis Byrum [aut, cre], Sharon Bewick [aut], William Fagan [aut] |
Maintainer: | Travis Byrum <tbyrum@terpmail.umd.edu> |
Repository: | CRAN |
Date/Publication: | 2020-08-07 13:50:07 UTC |
mosqcontrol: Mosquito Control Resource Optimization
Description
This project aims to make an accessible model for mosquito control resource optimization. The model uses data provided by users to estimate the mosquito populations in the sampling area for the sampling time period, and the optimal time to apply a treatment or multiple treatments.
Author(s)
Maintainer: Travis Byrum tbyrum@terpmail.umd.edu
Authors:
Jeff Demers jdemeripi@gmail.com
Anshuman Swain answain@terpmail.umd.edu
Sharon Bewick sharon_bewick@hotmail.com
William Fagan bfagan@umd.edu
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
P_vals
Description
P_vals
returns "P" product.
Usage
P_vals(z, rho, Npulse, tau, k)
Arguments
z |
Numeric |
rho |
Numeric |
Npulse |
Numeric |
tau |
Numeric |
k |
Numeric |
Details
This function computes the "P" product and exponentials for a given k.
Q_vals
Description
Q_vals
returns "Q" product.
Usage
Q_vals(z, rho, Npulse, tau, j, jj)
Arguments
z |
Numeric |
rho |
Numeric |
Npulse |
Numeric |
tau |
Numeric |
j |
Matrix |
jj |
Matrix |
Details
This function computes the "Q" product and exponentials with the fourier modes for a given k
Optimal Control
Description
Creates optimal schedule of pulses for mosquito control.
Usage
control(
counts,
time,
mu = 1/14,
m = 3,
n_lam = 25,
kmax = 20,
global_opt = 0,
n_pulse = 4,
rho = 0.3,
days_between = 3,
max_eval = 10000
)
Arguments
counts |
Numeric vector of population counts. |
time |
Numeric vector with corresponding day of year measurments.
Example: Jan 1st = day 1. Must be same length as |
mu |
Numeric indicating natural population death rate. |
m |
Numeric indicating number of lifetimes for population decay between seasons |
n_lam |
Numeric max fourier mode order to calculate. |
kmax |
Numeric max number of dynamics fourier modes to use in calculating fourier sum (different than N_lam = max emergence fourier mode set by user for curve fitting portion of the code. Kmax should be an integer between 2 and 200, default at 20. |
global_opt |
Numeric set to 0 if user chooses local optimum, 1 if user chooses golbal GN_DIRECT_L_RAND method, 2 if user chooses global GN_ISRES method. |
n_pulse |
Numeric number of pulses, set by user, integer between 1 and 10. |
rho |
Numeric percent knockdown (user set between .01 and .30, e.g. 1% to 30% knockdown). |
days_between |
Numeric minimum number of days allowed between pulses set by user (integer bewtween 0 and 30 days). |
max_eval |
Numeric maximum evaluations for optimization step. |
Value
Control list of control parameters.
Examples
y_in <- c(15, 40, 45, 88, 99, 145, 111, 132, 177, 97, 94, 145, 123, 111,
125, 115, 155, 160, 143, 132, 126, 125, 105, 98, 87, 54, 55, 8
)
t_in_user <- c(93, 100, 107, 114, 121, 128, 135, 142, 149, 163, 170, 177,
184, 191, 198, 205, 212, 219, 226, 233, 240, 247, 254, 261,
267, 274, 281, 288
)
control(y_in, t_in_user, global_opt = -1)
sum_n_pulse
Description
sum_n_pulse
returns output pulse.
Usage
sum_n_pulse(z, rho, Npulse, mu, tau, kmax, modes)
Arguments
z |
Numeric |
rho |
Numeric |
Npulse |
Numeric |
mu |
Numeric |
tau |
Numeric |
kmax |
Numeric |
modes |
Numeric |
Details
This function computes the Fourier sum for N pulses, where the "P" and "Q" products and exponentials are computeded by the "P_vals" and "q_vals" functions.
sum_one_pulse
Description
sum_one_pulse
returns output pulse.
Usage
sum_one_pulse(z, rho, mu, tau, kmax, modes)
Arguments
z |
Numeric |
rho |
Numeric |
mu |
Numeric |
tau |
Numeric |
kmax |
Numeric |
modes |
Numeric |
Details
This function computes the fourier sum for 1 pulse.
uperm
Description
uperm
returns permutation matrix.
Usage
uperm(d)
Arguments
d |
Vector |
Details
For a given list of numbers, this function outputs a matrix, where each row is a unique permutation of the list.
Examples
uperm(c(1, 2))