RunExperiment: Run an experimental setup

Description Usage Arguments Details Value Examples

View source: R/RRepast.R

Description

Run the model multiple times for different parameters given by design matrix function parameter.

Usage

1
RunExperiment(e, r = 1, design, FUN)

Arguments

e

An engine object instance

r

The number of experiment replications

design

The desing matrix holding parameter sampling

FUN

THe calibration function.

Details

The FUN function must return zero for perfect fit and values greater than zero otherwise.

Value

A list with output and dataset

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
   my.cost<- function(params, results) { # your best fit calculation, being 0 the best metric.  }
   d<- "c:/usr/models/your-model-directory"
   m<- Model(d,dataset="ds::Output")
   Load(m)
   f<- AddFactor(name="cyclePoint",min=40,max=90)
   f<- AddFactor(factors=f, name="conjugationCost",min=1,max=80)
   d<- LatinHypercube(factors=f)
   p<- GetSimulationParameters(e)
   exp.design<- BuildParameterSet(d,p)
   v<- RunExperiment(e,r=1,exp.design,my.cost) 
## End(Not run)

rrepast documentation built on May 29, 2017, 8:47 p.m.