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.
Currently, a call to
runCalibrationNIMBLE()makes three copies of the model and compilestwice: 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:
compileNimble(list(...)).modelValuesfor 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.