SpaDES (version 1.2.0)

params: Get and set simulation parameters.

Description

Accessor functions for the params slot of a simList object and its elements. Additonal methods are provided to access core module and global parameters: Commonly used
globals
List of global simulation parameters.
params
Nested list of all simulation parameters.
Advanced use
Accessor method Module
Description checkpointFile
.checkpoint Name of the checkpoint file. (advanced)
checkpointInterval .checkpoint
The simulation checkpoint interval. (advanced) progressType
.progress Type of graphical progress bar used. (advanced)
progressInterval .progress
Interval for the progress bar. (advanced) Accessor method

Usage

params(object)
"params"(object)
params(object) <- value
"params"(object) <- value
globals(object)
"globals"(object)
globals(object) <- value
"globals"(object) <- value
checkpointFile(object)
"checkpointFile"(object)
checkpointFile(object) <- value
"checkpointFile"(object) <- value
checkpointInterval(object)
"checkpointInterval"(object)
checkpointInterval(object) <- value
"checkpointInterval"(object) <- value
progressInterval(object)
"progressInterval"(object)
progressInterval(object) <- value
"progressInterval"(object) <- value
progressType(object)
"progressType"(object)
progressType(object) <- value
"progressType"(object) <- value

Arguments

object
A simList simulation object.
value
The object to be stored at the slot.

Value

Returns or sets the value of the slot from the simList object.

Details

Currently, only get and set methods are defined. Subset methods are not.

Progress Bar: Progress type can be "text", "graphical" or "shiny". Progress interval can be a numeric. These both can get set by passing a .progress=list(type="graphical", interval=1) into the simInit call. See examples

See Also

simList-class, simList-accessors-envir, simList-accessors-events, simList-accessors-inout, simList-accessors-modules, simList-accessors-objects, simList-accessors-paths, simList-accessors-times.

Examples

Run this code
## Not run: 
# mySim <- simInit(times=list(start=0.0, end=100.0),
#                  params=list(.globals=list(stackName="landscape"),
#                              .progress=list(type="text", interval=10),
#                              .checkpoint = list(interval = 10, file = "chkpnt.RData")),
#                  modules=list("randomLandscapes"),
#                  paths=list(modulePath=system.file("sampleModules", package="SpaDES")))
# 
# # progress bar
# progressType(mySim) # "text"
# progressInterval(mySim) # 10
# 
# # parameters
# params(mySim) # returns all parameters in all modules
#               # including .global, .progress, .checkpoint
# globals(mySim) # returns only global parameters
# 
# # checkpoint
# checkpointFile(mySim) # returns the name of the checkpoint file
#                       # In this example, "chkpnt.RData"
# checkpointInterval(mySim) # 10
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace