checkpoint: Simulation checkpoints.

Description Usage Arguments Details Value Author(s) See Also

Description

Save and reload the current state of the simulation, including the state of the random number generator, by scheduling checkpoint events.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
doEvent.checkpoint(sim, eventTime, eventType, debug = FALSE)

checkpointLoad(file)

.checkpointSave(sim, file)

checkpointFile(sim)

## S4 method for signature 'simList'
checkpointFile(sim)

checkpointFile(sim) <- value

## S4 replacement method for signature 'simList'
checkpointFile(sim) <- value

checkpointInterval(sim)

## S4 method for signature 'simList'
checkpointInterval(sim)

checkpointInterval(sim) <- value

## S4 replacement method for signature 'simList'
checkpointInterval(sim) <- value

Arguments

sim

A simList simulation object.

eventTime

A numeric specifying the time of the next event.

eventType

A character string specifying the type of event: one of either "init", "load", or "save".

debug

Optional logical flag determines whether sim debug info will be printed (default debug = FALSE).

file

The checkpoint file.

value

The parameter value to be set (in the corresponding module and param).

Details

RNG save code adapted from: http://www.cookbook-r.com/Numbers/Saving_the_state_of_the_random_number_generator/ and https://stackoverflow.com/q/13997444/1380598

Value

Returns the modified simList object.

Author(s)

Alex Chubaty

See Also

.Random.seed.

Other functions to access elements of a 'simList' object: .addDepends(), envir(), events(), globals(), inputs(), modules(), objs(), packages(), params(), paths(), progressInterval(), times()


SpaDES.core documentation built on Sept. 30, 2021, 5:10 p.m.