inactivation_OED_penalty: Optimum Experimental Design of Microbial Inactivation with...

Description Usage Arguments Value Examples

View source: R/OED_penalty.R

Description

Performs an optimum experimental design for the settings selected including a function which penalties points too close. The OED is based on the FIM, estimated using the local sensitivity functions provided by sensitivity_inactivation.

Usage

1
2
3
4
inactivation_OED_penalty(inactivation_model, parms, temp_profile,
  parms_fix, n_points, time_min, criteria = "D", n_times = 100,
  sensvar = "logN", optim_algorithm = "global", opts_global = NULL,
  ...)

Arguments

inactivation_model

Character string defining the inacivation model.

parms

Named numeric vector defining the model parameters. They must be named according to the needs of predict_inactivation.

temp_profile

Data frame defining the temperature profile. It must contain a column named time and a column named temperature.

parms_fix

Named numeric vector defining the model parameters to be omitted during the calculation of the local sensitivities.

n_points

Number of measurements which will be taken during the experiment.

time_min

Numeric value indicating the minimum space between measurements.

criteria

Character defining the criteria for the OED. Either D (default) or E-mod.

n_times

Integer defining th enumber of discrete time points used for the interpolation of the local sensitivities.

sensvar

Character defining the variable to use for the OED. Either logN (default) or N.

optim_algorithm

Character defining the type of algorithm to use for the optimization. Either global (default) or local.

opts_global

List defining the options for the global optimization algorithm (see MEIGO). By default, global solver with a maximum of 50000 function evaluations and printout on every step.

...

Additional arguments passed to penalty_function.

Value

A list of class OEDinactivation with the following items:

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Definition of input variables

parms_fix <- c(temp_ref = 57.5)
parms <- c(delta_ref = 3.9,
           z = 4.2,
           p = 1,
           N0 = 1e6
)

temp_profile <- data.frame(time = c(0, 60), temperature = c(30, 60))

n_points <- 5
time_min <- 10

## Not run: 

## OED with local optimization

set.seed(0123182)

local_OED <- inactivation_OED_penalty("Mafart", parms, temp_profile, parms_fix,
                              n_points, criteria = "E-mod", sensvar = "logN",
                              optim_algorithm = "local", time_min = time_min)

print(local_OED$optim_times)
plot(local_OED)

## OED with global optimization

opts_global <- list(maxeval=500,  local_solver=0,
                    local_finish="DHC", local_iterprint=1)

global_OED <- inactivation_OED_penalty("Mafart", parms, temp_profile, parms_fix,
                               n_points, criteria = "E-mod", opts_global = opts_global,
                               time_min = time_min)

print(global_OED$optim_times)
plot(global_OED)


## End(Not run)

bioOED documentation built on Aug. 7, 2019, 5:03 p.m.