Closed dfalster closed 9 months ago
The first step being implemented is to add ode_aux
to Patch
so that it can be queried from an SCM
object. This will allow us to return the addtional state variables in run_scm_collect
using a collect_aux
flag.
Later we will address the second step by re-factoring the RcppR6 definition for *_Strategy
objects to expose methods as well as attributes by switching from a list class to a constructor class (which isn't super well defined in the RcppR6 docs)
This is achieved via commit referenced above, 65da50ab8550436ac32d50817b871903f86d469b
This relates to #296
The role of previous plant plus object was to give access to more of the internals. We were reluctant to store all of them for sake of speed. The redesign of strategy internals means this can now be accomplished using just a single strategy object, with a switch (
collect_all_auxillary
) to store more or fewer of the internals.I have two suggested pathways here. Arguably both would be good additions.
FF16_strategy.h
(at https://github.com/traitecoevo/plant/blob/99c443f81b98e1284e14dcda4102a31108ca039c/inst/include/plant/models/ff16_strategy.h#L39 and https://github.com/traitecoevo/plant/blob/99c443f81b98e1284e14dcda4102a31108ca039c/src/ff16_strategy.cpp#L129) to enable collecting more variables. The optioncollect_all_auxillary
in the constructor (see https://github.com/traitecoevo/plant/blob/99c443f81b98e1284e14dcda4102a31108ca039c/src/ff16_strategy.cpp#L10) can then be triggered only when runningrun_scm_collect
RcppR6_classes.yml
doesn't expose all the strategy functions. But it could. (would need to change from a list-like construct to something more likeCanopy
.