knitr::opts_chunk$set(cache = TRUE, echo = TRUE, eval = FALSE)
SpaDES
Spatial Discrete Event Simulator
SpaDES
is oriented around the construction of spatially explicit models and the use of spatial data.In Ecology, there are other generic DESs:
More specific DESs
Modules are a convenient way to group events that fit naturally together:
What is contained in one module is highly idiosyncratic .
SpaDES
is implemented in a way that facilitates modularity of code:
Thus, modules can be added, removed, or swapped out without needing to recode the rest of the model.
There are many types of modules that may be useful:
Once we see that a module is just a convenient way to group together events, anything can be a module. Can be a single line of code or as many as you want.
SpaDES
module... instead of just an R script or function?
allows modularity
can be published on the web
A module is an R script with 3 parts:
Metadata - a list of 15 things
doEvent - 2 types of things here
Anything else
SpaDES
Essentially 2 steps
simList
using simInit()
spades()
All the necessary information is contained within the simList
What might be needed for a DES to run...
simList
- start and stop times - data - paths - which modules to use - parameters - a schedule of events - outputs
(Will be covered in detail later)
SpaDES
has some helpers for loading data, but in general, the module should be explicit
downloadData("caribouMovementLcc", path = tempdir())
A module takes input data, changes them, and provides outputs
like a function, but with the addition of "time"
Some challenges ...
Numerous challenges exist with data
SpaDES
doesn't necessarily solve these issues, but in some cases it helps.
SpaDES
package):?SpaDES
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.