pompBuilder
is an EXPERIMENTAL facility for producing compiled pomp
objects.pompBuilder(data, times, t0, name, statenames, paramnames,
tcovar, covar,
rmeasure, dmeasure, step.fn, step.fn.delta.t,
skeleton, skeleton.type, skelmap.delta.t = 1,
parameter.transform, parameter.inv.transform,
..., link = TRUE)
pomp
for more information.
data
must be a data-frame.covar
is a data-frame containing covariates (variables in columns, timepoints in rows);
tcovar
is the name of the column containing time.step.fn
is a C code that implements an Euler step function.
The Euler time-step is step.fn.delta.t
, which should be a positive number.skeleton
is a C code that implements the deterministic skeleton.
As in pomp
, skeleton.type
indicates whether the skeleton is a map (discrete-time) or vectorfield (continuous-time).
If the former, skelma
parameter.transform
maps parameters from the estimation scale to the natural scale;
parameter.inv.transformation
maps them from the natural scale to the estimatiopomp
pomp
object.
A side-effect is the writing and compilation of a C code into a dynamics shared object.
These files will reside in the current working directory (see getwd
).
If pompBuilder
has been called with link=FALSE
, this dynamic shared object must be linked (see dyn.load
) before the pomp
object can be used. Parallel computing caution:
note that, since a side-effect of running pompBuilder
is the writing and compilation of a file, caution must be used when running parallel computations.
Simultaneous execution of pompBuilder
on nodes sharing a common disk will cause all nodes to attempt to write the same file at the same time;
the results will be undefined.
If multiple nodes are to work on the same pomp
object built by pompBuilder
, first run pompBuilder
once (perhaps with link=FALSE
) to write the C file and compile it into a dynamic shared object file.
The pomp
object returned by pompBuilder
can then be shared with all worker nodes.
Note, however, that all worker nodes must dynamically load (using dyn.load
) the dynamic shared object file before anything can be done with the pomp
object.
pompBuilder
assumes that files can be written to the current working directory and that dynamic shared objects can be compiled and linked, i.e., that R CMD SHLIB
will work.
This will not typically be the case in out-of-the-box Windows installations.pomp
and the demos.