doEvent {SpaDES.core} | R Documentation |
Process a simulation event
Description
Internal function called from spades
.
Usage
doEvent(
sim,
debug = FALSE,
notOlderThan,
useFuture = getOption("spades.futureEvents", FALSE),
events = NULL,
...
)
Arguments
sim |
Character string for the |
debug |
Optional tools for invoking debugging. Supplying a |
notOlderThan |
Date or time. Passed to |
useFuture |
Experimental use of future::future package. Not fully implemented. |
events |
A character vector or a named list of character vectors. If specified,
the simulations will only do the events indicated here. If a named list, the names
must correspond to the modules and the character vectors can be specific events within
each of the named modules. With the |
... |
Any. Can be used to make a unique cache identity, such as "replicate = 1".
This will be included in the |
Details
Calls the module corresponding to the event call, and executes the event.
Here, we implement a simulation in a more modular fashion so it's easier to add submodules to the simulation. We use S4 classes and methods.
Value
Returns the modified simList
object.
Author(s)
Alex Chubaty
References
Matloff, N. (2011). The Art of R Programming (ch. 7.8.3). San Francisco, CA: No Starch Press, Inc.. Retrieved from https://nostarch.com/artofr.htm