Commit 068d9190 authored by loup.rimbaud@csiro.au's avatar loup.rimbaud@csiro.au
Browse files

added 5 dispersal matrices in data/dispP_a40_b7; created test_landsepi()

parent 803188f0
Pipeline #65 failed with stage
in 2 minutes and 50 seconds
......@@ -47,5 +47,6 @@ Collate:
'demo_landsepi.R'
'landsepi.R'
'plotevolQR.R'
'test_landsepi.R'
LinkingTo: Rcpp
RoxygenNote: 6.0.1
......@@ -10,6 +10,7 @@ export(multiN)
export(periodic_cov)
export(plotevolQR)
export(plotland)
export(test_landsepi)
import(MASS)
import(RCALI)
import(Rcpp)
......
......@@ -10,8 +10,8 @@
#' @param inits list initial conditions (host planting density, initial probability of infection by the pathogen)
#' @param val_seed seed (for random number generation)
#' @param hostP list of host parameters (number of cultivars, growth rate of the susceptible cultivar, reproduction rate of the susceptible cultivar,
#' growth rate of resistant cultivars, reproduction rate of resistant cultivars, death rate, number of possible resistance sources (8)
#' , resistance formula, parameters of the sigmoid invasion function: kappa, sigma and s)
#' growth rate of resistant cultivars, reproduction rate of resistant cultivars, death rate, resistance formula,
#' parameters of the sigmoid invasion function: kappa, sigma and s)
#' @param epiP list of pathogen parameters (probability to survive the off-season, infection rate
#' , reproduction rate, average latent period duration, variance of the latent period, average infectious period duration
#' , variance of the infectious period duration, parameters of the sigmoid contamination function: kappa, sigma, s)
......
......@@ -16,35 +16,32 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,i
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#' Run demo landsepi
#' @title Package demonstration
#' @name demo_landsepi
#' @description Run a simulated example of mosaic deployment strategy of two resistant cultivars in balanced proportions and high level of spatial aggregation.
#' @description Run a simulated example of mosaic deployment strategy of two resistant cultivars in balanced proportions and
#' high level of spatial aggregation.
#' @param seed an integer used as seed value (for random number generator)
#' @include RcppExports.R AgriLand.R graphLand.R multiN.R periodic_cov.R
#' @importFrom utils data
#' @export
demo_landsepi <- function(){
seed=12345
set.seed(seed)
#outputs
demo_landsepi <- function(seed=12345){
pathRES <- getwd()
graphOn <- 1
#landscape parameters
propSR=2/3 ## proportion of cultivars >0
isolSR=3 ## Class of aggregation between S and R (0:3 with 1=low, 2=medium, 3=high, 4=random aggregation)
propRR=1/2 ## relative proportion of cultivars >1
isolRR=3 ## Class of aggregation between R1 and R2 (0:3 with 1=low, 2=medium, 3=high, 4=random aggregation)
strat <- "MO"
Nhote <- 3
nYears <- 5
Cmax0 <- 2
Cmax1 <- 2
propSR <- 2/3 ## proportion of cultivars >0
isolSR <- 3 ## Class of aggregation between S and R (0:3 with 1=low, 2=medium, 3=high, 4=random aggregation)
propRR <- 1/2 ## relative proportion of cultivars >1
isolRR <- 3 ## Class of aggregation between R1 and R2 (0:3 with 1=low, 2=medium, 3=high, 4=random aggregation)
strat <- "MO"
Nhote <- 3
nYears <- 30
Cmax0 <- 2
Cmax1 <- 2
# hack for cran check
landscapeTEST <- NULL
data(landscapeTEST, envir=environment())
......@@ -72,11 +69,10 @@ demo_landsepi <- function(){
RESISTANCE1 <- c(1,0,0,0,0,0,0,0)
RESISTANCE2 <- c(0,1,0,0,0,0,0,0)
RESISTANCE <- as.vector(cbind(RESISTANCE0,RESISTANCE1,RESISTANCE2))
Ntrait <- 8
khost <- 0.002
sighost <- 1.001
shost <- 1.0
paramH <- list(Nhote=Nhote,croisH0=croisH0,reproH0=reproH0,croisH1=croisH1,reproH1=reproH1,deathH=deathH,Ntrait=Ntrait,resistance=as.integer(RESISTANCE),khost=khost,sighost=sighost,shost=shost)
paramH <- list(Nhote=Nhote,croisH0=croisH0,reproH0=reproH0,croisH1=croisH1,reproH1=reproH1,deathH=deathH,resistance=as.integer(RESISTANCE),khost=khost,sighost=sighost,shost=shost)
#epidemiology
PSURV <- 1e-4
......
......@@ -34,8 +34,8 @@ characterise resistance breakdown}
\item{nMapPY}{number of epidemic maps per year to generate}
}
\value{
A set of text files containing all outputs of the simulations: durability, AUDPC, GLA. A set of graphics of host and pathogen dynamics, AUDPC, GLA, and epidemic
maps can also be generated.
A set of text files containing all outputs of the simulations (see details).
A set of graphics and epidemic maps can also be generated.
}
\description{
Generate epidemiological and evolutionary outputs from model simulations.
......
......@@ -4,10 +4,14 @@
\alias{demo_landsepi}
\title{Package demonstration}
\usage{
demo_landsepi()
demo_landsepi(seed = 12345)
}
\arguments{
\item{seed}{an integer used as seed value (for random number generator)}
}
\description{
Run a simulated example of mosaic deployment strategy of two resistant cultivars in balanced proportions and high level of spatial aggregation.
Run a simulated example of mosaic deployment strategy of two resistant cultivars in balanced proportions and
high level of spatial aggregation.
}
\details{
Run demo landsepi
......
......@@ -14,6 +14,9 @@
}
\details{
The pathogen dispersal matrix gives the probability for a pathogen in a field i (row) to migrate to field i' (column) through dispersal. It is computed based on a dispersal kernel and the euclidian distance between each point in fields i and i', using the CaliFloPP algorithm (Bouvier et al. 2009).
The dispersal kernel is an isotropic power-law function of equation:
f(x)=((b-2)*(b-1)/(2*pi*a^2)) * (1 + x/a)^(-b)
with a>0 a scale parameter and b>2 related to the weight of the dispersal tail. The expected mean dispersal distance is given by 2*a/(b-3).
%% ~~ If necessary, more details than the __description__ above ~~
}
\references{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment