Easy.Calibration: Easy.Calibration

Description Usage Arguments Value Examples

View source: R/rrepast-easyapi.R

Description

Search for the best set of parameters trying to minimize the calibration function provided by the user. The function has to operational models, the first based on the experimental setup where all parameters are defined a priori and the second using optimization techniques. Currently the only supported optimization technique is the particle swarm optimization.

Usage

1
2
Easy.Calibration(m.dir, m.ds, m.time = 300, parameters, exp.n = 100,
  exp.r = 1, smax = 4, design = "lhs", FUN, default = NULL)

Arguments

m.dir

The installation directory of some repast model

m.ds

The name of any model aggregate dataset

m.time

The total simulated time

parameters

The input factors

exp.n

The experiment sample size

exp.r

The number of experiment replications

smax

The number of solutions to be generated

design

The sampling scheme ["lhs"|"mcs"|"ffs"]

FUN

The objective or cost function. A function defined over the model output.

default

The alternative values for parameters which should be kept fixed

Value

A list with holding experiment, object and charts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
 my.cost<- function(params, results) {
   criteria<- c()
   Rate<- AoE.RMSD(results$X.Simulated,results$X.Experimental)
   G<- AoE.RMSD(results$G.T.,52)
   total<- Rate + G
   criteria<- cbind(total,Rate,G)
   return(criteria)
 }
 
 Easy.Setup("/models/BactoSim")
 v<- Easy.Calibration("/models/BactoSim","ds::Output",360,
                       f,exp.n = 1000, exp.r=1, smax=4, 
                       design="mcs", my.cost)
 

## End(Not run)

antonio-pgarcia/RRepast documentation built on Feb. 22, 2020, 1:20 a.m.