SpaDES
waySpaDES
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
Can be 1 lines of code or as large as you want
SpaDES
module… instead of just an R script or function?
allows modularity
and much more…
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
SpaDES
has some helpers for loading data, but in general, the module should be explicit
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.
package help docs (e.g., overview of SpaDES
package):
SpaDES
wiki (link)SpaDES
user group (link)bug reports (link)