New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkpoint module needs to work with the simEnv #191

Closed
achubaty opened this Issue Jun 3, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@achubaty
Contributor

achubaty commented Jun 3, 2015

be sure to also update the documentation, particularly the modules vignette

@achubaty achubaty self-assigned this Jun 3, 2015

achubaty added a commit that referenced this issue Jun 6, 2015

redefine `simList` class; improve documentation
* new superclass `.simList` contains all previous `simList` slots except
`.envir`
* class `simList` extends `.simList` by adding slot `.envir`
* new class `simList_` extends `.simList` by adding slot `.list`
* because, saving lists of objects to file is more reliable that saving
environments, `simList_` can be used internally to save the `simList`
object and converted back upon load (part of #191)
* improved `simList` documentation

achubaty added a commit that referenced this issue Jun 6, 2015

achubaty added a commit that referenced this issue Jun 6, 2015

@achubaty

This comment has been minimized.

Contributor

achubaty commented Jun 6, 2015

commit 0a7d89c erroneously referred to #160 insead of #130

@achubaty

This comment has been minimized.

Contributor

achubaty commented Jun 6, 2015

@eliotmcintire I think the last step here is to make sure objects can be replotted once restored from a checkpoint. Can you please take a look?

I think something along the lines of the following should probably work (it doesn't):

library(SpaDES)
times <- list(start=0, stop=30)
parameters <- list(.globals=list(stackName="landscape"), .checkpoint=list(interval=10, file="chkpnt.RData"))
modules <- list("randomLandscapes", "caribouMovement")
path <- system.file("sampleModules", package="SpaDES")
mySim <- simInit(times=times, params=parameters, modules=modules, path=path)

mySim <- spades(mySim)
clearPlot()
simStopTime(mySim) <- 50
mySim <- spades(mySim)
rePlot()

eliotmcintire added a commit that referenced this issue Jun 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment