Skip to content

Avoid copying the model multiple times #11

Description

@salleuska

Currently, a call to runCalibrationNIMBLE() makes three copies of the model and compiles
twice: one copy for the calculator, one for the simulate function (which is not currently compulile)mand the original for the MCMC.

They never run at the same time, so one model is enough.

To do:

  • Reduce to a single model and compile everything against it in one
    compileNimble(list(...)).
  • Compile the simulate function with the rest.
  • Use modelValues for restore model or mcmc to the input state.

Watch the starting values: the calculator leaves the model holding the last
draw it looked at, so the next replicate's chain starts from there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions