JOD: Joint Optimal Design

Description Usage Arguments Value Examples

View source: R/jod.R

Description

Given a set of georeferenced measurements, this function finds 'add.pts' new locations for sampling, calculated jointly using a GA-based heuristic.

Usage

1
2
JOD(geodata, add.pts, kcontrol, kgrid, num.gen, gen.size, elite.size,
  parallel = T)

Arguments

geodata

A geodata object containing the initial sample

add.pts

Number of points to be added to the initial sample

kcontrol

Parameters for kriging as a krige.geoR object. See the help for krige.control for further details

kgrid

malha de krigagem. TODO mudar isso! botar pra ser definido por 'n', que nem no SOD

num.gen

Number of generations (iterations)

gen.size

Number of samples in each iteration

elite.size

Number of samples in elite. Should be lesser than or equal to gen.size %/% 2 TODO escrever isso direito

Value

A list with all of the generations and values of the utility function which can be plotted as shown in the examples. TODO RETORNAR S<c3><93> A <c3><9a>LTIMA

Examples

 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
add.pts <- 4 # Number of points to be added
n <- 10 # Number of points to define the candidate grid
N <- 15 # Number of points for the simulation
gen.size <- 10 # Number of samples in each iteration
elite.size <- 4 # Number of samples in elite
num.gen <- 50 # Number of generations (iterations)

library(geoR)

set.seed(400)
geodata <- grf(N, cov.pars = c(20, 0.45), nugget = 1)
beta1 <- mean(geodata$data)
emv <- ajemv(geodata,ini.phi = 0.4,ini.sigma2 = 10, pepita = 1,
             modelo = 'exponential', plot = F)
kcontrol <- krige.control(type.krige = "SK",
                          trend.d = "cte",
                          nugget = emv$tausq,
                          beta = beta1,
                          cov.pars = emv$cov.pars)
kgrid <- expand.grid(seq(0, 1, l = n), seq(0, 1, l = n))

newsample <- JOD(geodata, add.pts, kcontrol, kgrid, num.gen, gen.size,
elite.size)

plot(newsample)

ziddec/geodesign documentation built on May 29, 2019, 12:20 p.m.