getmodelparameter: Parameter loader for GAMA

Description Usage Arguments Details Value Author(s) Examples

Description

Load and read parameter and outputs from your model

Usage

1
getmodelparameter(modelfile, experimentname)

Arguments

modelfile

Path of your gaml file

experimentname

Experiment name inside your model

Details

good luck

Value

Experiment name is defined in the model and can not be null Model file must exist :-)

Author(s)

Nicolas Marilleau - UMI UMMISCO - Research Institute for the Development

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
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
##When you have define your plateform location with \code{\link{defpath}}, you can load experiment with the following command :
f <- system.file("examples",package="gamar")
experiment1 <- getmodelparameter(paste0(f,"/sir.gaml"),"sir")


## The function is currently defined as
##function (modelfile, experimentname)
##{
##    cat(paste0("Loading experiment '", experimentname, "' from file '",
##        basename(modelfile), "'...\n"))
##   outfile <- createmodelparameterfilename(experimentname)
#    trycommand <- system(paste0("java -jar ", getOption("gamar.startjar"),
#        " -Xms", getOption("gamar.Xms"), " -Xmx", getOption("gamar.Xmx"),
#        " -Djava.awt.headless=true org.eclipse.core.launcher.Main ",
#        "-application msi.gama.headless.id4 -xml ", experimentname,
#        " ", modelfile, " ", outfile, ">/dev/null"), ignore.stdout = T,
#        ignore.stderr = T)
#    unlink("workspace", T, T)
#    if (trycommand > 0)
#        return(-1)
#    out <- XML::xmlToList(XML::xmlParse(outfile))
#    class(out) <- c("experiment", class(out))
#    out
#  }

choisy/gamar documentation built on May 13, 2019, 5:30 p.m.