This function creates objects of class Output
and saves each to
file (at dir/model_name/<out_loc>/r<index>_<method_name>.Rdata. If parallel
is not NULL, then it must be a list containing socket_names
, which can
either be a positive integer specifying the number of copies to run on
localhost or else a character vector of machine names (e.g.,
"mycluster-0-0"). The list parallel
can also contain
libraries
, a character vector of R packages that will be needed on the
slaves and save_locally
, a logical that indicates whether the files
generated should be saved on the slaves (i.e., locally) or on the master.
Before running each method on index i, the RNG state is restored to what it
was at the end of calling simulate_from_model
on this index.
This is only relevant for randomized methods. The choice to do this ensures
that one will get identical results regardless of the order in which methods
and indices are run in. When ExtendedMethod
objects are
passed, these are run after all Method
objects have been run. This is
because each ExtendedMethod
object depends on the output of its base
method. Furthermore, before an ExtendedMethod
is called, the RNG
state is restored to what it was after the base method had been called.