Save and reload the current state of the simulation, including the state of the random number generator, by scheduling checkpoint events.
doEvent.checkpoint(sim, eventTime, eventType, debug = FALSE)checkpointLoad(file)
.checkpointSave(sim, file)
checkpointFile(object)
# S4 method for .simList
checkpointFile(object)
checkpointFile(object) <- value
# S4 method for .simList
checkpointFile(object) <- value
checkpointInterval(object)
# S4 method for .simList
checkpointInterval(object)
checkpointInterval(object) <- value
# S4 method for .simList
checkpointInterval(object) <- value
A simList simulation object.
A numeric specifying the time of the next event.
A character string specifying the type of event: one of
either "init", "load", or "save".
Optional logical flag determines whether sim debug info
will be printed (default debug = FALSE).
The checkpoint file.
A simList simulation object.
The object to be stored at the slot.
Returns the modified simList object.
checkpointLoad and .checkpointSave code based on:
https://raw.githubusercontent.com/achubaty/r-tools/master/checkpoint.R
RNG save code adapted from: http://www.cookbook-r.com/Numbers/Saving_the_state_of_the_random_number_generator/ and https://stackoverflow.com/questions/13997444/
Other functions to access elements of a simList object: .addDepends,
envir, events,
globals, inputs,
ls.simList, ls.str.simList,
modules, objs,
packages, params,
paths, progressInterval,
times