Description Usage Arguments Details References See Also Examples
View source: R/simulation_control_cyclic_v1.R
Epidemic simulation using the contact type model with the Australian control strategies.
1 2 3 4 5 6 7 8 | Simulate_contact_control3(f_rast = NULL, b_rast = NULL,
farm_pos_cat = NULL, vis_int_per_cat = NULL, param, grid_lines,
pop_grid, grid_size = 500, age_level = c(1, 1), age_dist = c(1, 0),
m_start = 1, t_b = 1e+05, t_max = 1000, t_intervention = 1e+05,
t_obs = 3703, EI_model = 1, kern_model = 4, rad = 1000,
sweep_prop = c(0.5, 0.5), back_p = c(0.7, 0.5), rate_det = 0.3,
int_det = c(30, 90, 180), nb_in_b = 1, nb = 30, leav = c(3, 6),
ini = NULL)
|
f_rast |
Population density of the grid a farm plant resides. This is filled from bottom to top, then left to right. |
b_rast |
Population density of the grid a backyard plant resides. This is filled from bottom to top, then left to right. |
farm_pos_cat |
A data frame of the intial conditon:
|
vis_int_per_cat |
A data frame of the visiting intervale for the alternative strategy:
|
param |
Indicating a data frame containing a vector of parameters including:
.
. |
pop_grid |
Population density of the grid a case resides. This is filled from bottom to top, then left to right. |
grid_size |
Grid resolution //@inheritParams circle_line_intersections |
age_level |
Vectors of age level and the propportion of each age group respectively. See details. |
age_dist |
Vectors of age level and the propportion of each age group respectively. See details. |
m_start |
The size of initial cases. Default is 1. |
t_b |
Time representing the end of the baseline programme or the start of the alternative programme |
t_max |
Final observation time. |
t_intervention |
Start of the intervention if any. |
t_obs |
End of the observation time. |
EI_model |
Take integer values to specify the type of model used for the latent period. See |
kern_model |
Take integer values to specify the type of dispersal kernel used. See |
rad |
Sweep radius |
sweep_prop |
A two element vector represention the proportion of plantation to consider for the sweep |
back_p |
A two element vector represention thes Backyard assessment proportion within sweep radius: |
rate_det |
Detection rate.
|
int_det |
Three elements vector representing the revisit intervals: |
nb_in_b |
The number of initial plants infected in category B farms |
nb |
The scaling factor of backyards |
leav |
The number of leaves to consider as a measurement for removal: 3 for expert to have a 100 detection |
Simulate_contact_control2
provide the simulation of the epidemic process with the Australian BBTV management plan.
KR08contactsimulator \insertRefMee11contactsimulator
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | f<- system.file("external/rast_SEQ.tif", package="contactsimulator")
rast<- raster(f)
size<- raster::res(rast)[1]
# Extract infos on the grid
n_row_grid=nrow_grid=raster::nrow(rast)
n_col_grid=ncol_grid=raster::ncol(rast)
grid_size=raster::res(rast)[1] # Resolution
n_line=(nrow_grid+1) + (ncol_grid +1) # Number of grid lines
x_min=raster::xmin(rast) # min max of the bounding box
x_max=raster::xmax(rast)
y_min=raster::ymin(rast)
y_max=raster::ymax(rast)
da=as.data.frame(pointsinaustraliangrid)
pop_per_grid=round(raster::values(rast)*size^2)
pop_per_grid[is.na(pop_per_grid)]=0
mat=matrix(pop_per_grid,nrow = nrow_grid, byrow = TRUE)
pop_grid=apply(mat,2,rev) # population per grid
# Structure of the grid
x=seq(x_min,x_max,grid_size)
y=seq(y_min,y_max,grid_size)
grid_lines=array(0,c(n_line,6))
for(i in 1:n_line){
if(i<=(nrow_grid +1)){
grid_lines[i,]=c(i,1,x[1],y[i],x[length(x)],y[i])
}
else{
grid_lines[i,]=c(i,2,x[i-length(y)],y[1],x[i-length(y)],y[length(y)])
}
}
grid_lines=as.data.frame(grid_lines)
colnames(grid_lines)<- c("indx","orient_line","coor_x_1","coor_y_1","coor_x_2","coor_y_2")
circle_x=2022230
circle_y=-3123109
r=10000
# Simulation with exponential kernel
alpha<- 30; beta<- 0.012; epsilon<- 0.02; omega<- 0.12; mu_lat<- 30; var_lat<- 20; t0<- 0; c<- 20; b1<-0; gama<- 0.5
param=data.frame(alpha1=alpha, alpha2=alpha, beta=beta, epsilon=epsilon, omega=omega, mu_lat=mu_lat, var_lat=var_lat, t0=t0, c=c, b1=b1, gama=gama)
f<- system.file("external/rast_farms_SEQ.tif", package="contactsimulator")
f_rast<- raster(f)
pop=round(raster::values(f_rast)*size^2)
pop[is.na(pop)]=0
mat=matrix(pop,nrow = nrow_grid, byrow = TRUE)
f_rast=apply(mat,2,rev)
y<- system.file("external/rast_backy_SEQ.tif", package="contactsimulator")
b_rast<- raster(y)
pop=round(raster::values(b_rast)*size^2)
pop[is.na(pop)]=0
mat=matrix(pop,nrow = nrow_grid, byrow = TRUE)
b_rast=apply(mat,2,rev)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.