plant icon indicating copy to clipboard operation
plant copied to clipboard

Default Control parameters

Open aornugent opened this issue 4 years ago • 2 comments

I was a little surprised to see the default Control parameters are overloaded when using scm_base_parameters @L74

expect_equal(scm_base_parameters("K93"), K93_Parameters())
Error: scm_base_parameters("K93") not equal to K93_Parameters().
Component “control”: Component “plant_assimilation_adaptive”: 1 element mismatch
Component “control”: Component “plant_assimilation_tol”: Mean relative difference: 0.99
Component “control”: Component “cohort_gradient_direction”: Mean relative difference: 2
Component “control”: Component “environment_light_tol”: Mean relative difference: 0.99
Component “control”: Component “environment_rescale_usually”: 1 element mismatch
Component “control”: Component “ode_step_size_max”: Mean relative difference: 0.98
Component “control”: Component “ode_tol_rel”: Mean relative difference: 0.99
Component “control”: Component “ode_tol_abs”: Mean relative difference: 0.99
Component “control”: Component “schedule_eps”: Mean relative difference: 0.8
...

Is there any reason why the fast_control() parameters aren't used by default?

Interestingly they give quite different results (as well as being faster):

K93_Control

image

scm_base_parameters("K93")

image

EDIT: both cases with k_I = 1e-6 and disturbance_mean_interval = 200

aornugent avatar Sep 18 '20 05:09 aornugent

Hmm, good question. The fast_control is less accurate. Can't answer why it's not the default, but perhaps accuracy first, then speed, only when you choose it?

How many cohorts and time steps are in the above plots?

The second one is capturing the development of a new understory class around 500 years, so in principal is more accurate. But the labelling of the plots suggests the opposite (fast control is applied in the scm_base_parameters) function?

this is something we should clean up and make more transparent.

Also, I noticed this in the Control.h object:

"// The `Control` object holds all the non-biological control
// parameters.  These might get templated against different ways of
// running things as in the same way as `Strategy` and `Parameters`
// but for now assume that they don't.
//
// Control is really hierarchical, but is not actually modelled that
// way yet.  For now, the hierarchy is indicated only by naming
// convention, but this is stored as a flat bunch of things.
//
// Because Control is essentially a dumb set of parameters that has no
// real functionality, we don't export it as a reference class, but
// instead use RcppR6's "list" export ability.
//
// TODO: Eventually I need to make sure that the numbers here are
// reasonable, and probably shepherd the translation from int to
// size_t.

dfalster avatar Sep 21 '20 06:09 dfalster

How many cohorts and time steps are in the above plots?

440 cohorts, 441 timesteps for both models.

But the labelling of the plots suggests the opposite (fast control is applied in the scm_base_parameters) function?

That's right - it's not yet clear to me why these parameters would permit the understory development. Squinting at the graph - perhaps greater accuracy lets more of the intial cohorts to squeak through, increasing suppression of smaller individuals?

image

aornugent avatar Sep 25 '20 00:09 aornugent