Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
901 lines (875 sloc) 30.1 KB
Lorenz:
name_cpp: "plant::ode::test::Lorenz"
constructor:
args: [sigma: double, R: double, b: double]
active:
ode_size: {type: size_t, access: member}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state", name_cpp_set: "plant::ode::r_set_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
pars: {type: "std::vector<double>", access: member}
OdeR:
name_cpp: "plant::ode::test::OdeR"
forward_declare: true
constructor:
args: [derivs: "Rcpp::Function", state: "Rcpp::Function", time: double]
methods:
update_state: {return_type: void}
OdeRunner:
name_cpp: "plant::ode::Runner<T>"
templates:
parameters: T
concrete:
- ["Lorenz": "plant::ode::test::Lorenz"]
- ["OdeR": "plant::ode::test::OdeR"]
- ["FF16": "plant::tools::PlantRunner<plant::FF16_Strategy>"]
- ["FF16r": "plant::tools::PlantRunner<plant::FF16r_Strategy>"]
constructor:
args: [obj: T, control: "plant::ode::OdeControl=OdeControl()"]
active:
time: {type: double, access: member}
state: {type: "plant::ode::state_type", access: member}
times: {type: "std::vector<double>", access: member}
object: {type: T, access: member}
methods:
advance: {return_type: void, args: [time: double]}
advance_fixed: {return_type: void, args: [time: "std::vector<double>"]}
step: {return_type: void}
step_to: {return_type: void, args: [time: double]}
set_state: {return_type: void, args: [y: "plant::ode::state_type", time: double]}
set_state_from_system: {return_type: void}
CohortScheduleEvent:
name_cpp: "plant::CohortScheduleEvent"
constructor:
args: [introduction: double, species_index: "plant::util::index"]
active:
species_index: {type: "plant::util::index", access: field, name_cpp: species_index}
times: {type: "std::vector<double>", access: field, readonly: true}
time_introduction: {type: double, access: member}
time_end: {type: double, access: member}
species_index_raw: {type: "size_t", access: member, name_cpp: species_index_raw}
CohortSchedule:
name_cpp: "plant::CohortSchedule"
constructor:
roxygen: |
Schedule of cohort introduction times
@param n_species number of species
@export
args: [n_species: size_t]
active:
size: {type: size_t, access: member}
n_species: {type: size_t, access: member, name_cpp: get_n_species}
next_event: {type: "plant::CohortScheduleEvent", access: member}
remaining: {type: size_t, access: member}
max_time: {type: double, access: member, name_cpp: get_max_time, name_cpp_set: r_set_max_time}
ode_times: {type: "std::vector<double>", access: member, name_cpp: r_ode_times, name_cpp_set: r_set_ode_times}
use_ode_times: {type: bool, access: member, name_cpp: using_ode_times, name_cpp_set: r_set_use_ode_times}
all_times: {type: SEXP, access: member, name_cpp: r_all_times, name_cpp_set: r_set_all_times}
methods:
expand:
return_type: "plant::CohortSchedule"
args: [n_extra: size_t, times: "std::vector<double>"]
clear_times:
return_type: void
args: [species_index: "plant::util::index"]
clear_ode_times:
return_type: void
name_cpp: r_clear_ode_times
set_times:
return_type: void
name_cpp: r_set_times
args: [times: "std::vector<double>", species_index: "plant::util::index"]
times:
return_type: "std::vector<double>"
name_cpp: r_times
args: [species_index: "plant::util::index"]
reset:
return_type: void
pop:
return_type: void
copy:
return_type: "plant::CohortSchedule"
name_cpp: r_copy
Disturbance:
name_cpp: "plant::Disturbance"
constructor:
roxygen: |
Disturbance control object
@param mean_interval Mean disturbance interval in years
@export
args: [mean_interval: double]
methods:
density:
args: [time: "std::vector<double>"]
return_type: "std::vector<double>"
name_cpp: r_density
pr_survival:
args: [time: double]
return_type: double
pr_survival_conditional:
args: [time: double, time_start: double]
return_type: double
cdf:
args: [time: double]
return_type: double
active:
mean_interval: {type: double, access: member, name_cpp: r_mean_interval}
Control:
name_cpp: "plant::Control"
roxygen: |
Control parameters that tune various aspects of the numerical solvers.
@title Control parameters
@param ...,values Values to initialise the struct with (either as
variadic arguments, or as a list, but not both).
@export
list:
- plant_assimilation_adaptive: bool
- plant_assimilation_over_distribution: bool
- plant_assimilation_tol: double
- plant_assimilation_iterations: size_t
- plant_assimilation_rule: size_t
- plant_seed_tol: double
- plant_seed_iterations: int
- cohort_gradient_eps: double
- cohort_gradient_direction: int
- cohort_gradient_richardson: bool
- cohort_gradient_richardson_depth: size_t
- environment_light_tol: double
- environment_light_nbase: size_t
- environment_light_max_depth: size_t
- environment_light_rescale_usually: bool
- ode_step_size_initial: double
- ode_step_size_min: double
- ode_step_size_max: double
- ode_tol_rel: double
- ode_tol_abs: double
- ode_a_y: double
- ode_a_dydt: double
- schedule_nsteps: size_t
- schedule_eps: double
- schedule_verbose: bool
- schedule_patch_survival: double
- equilibrium_nsteps: size_t
- equilibrium_eps: double
- equilibrium_large_seed_rain_change: double
- equilibrium_verbose: bool
- equilibrium_solver_name: "std::string"
- equilibrium_extinct_seed_rain: double
- equilibrium_nattempts: int
- equilibrium_solver_logN: bool
- equilibrium_solver_try_keep: bool
OdeControl:
name_cpp: "plant::ode::OdeControl"
roxygen: |
Control parameters for the ode system
@title ODE Control parameters
@param ...,values Values to initialise the struct with (either as
variadic arguments, or as a list, but not both).
@export
list:
- tol_abs: double
- tol_rel: double
- a_y: double
- a_dydt: double
- step_size_min: double
- step_size_max: double
- step_size_initial: double
QK:
name_cpp: "plant::quadrature::QK"
constructor:
roxygen: |
Gauss-Kronrod Quadrature
@param rule Degree of the rule; valid sizes are 15, 21, 31, 41, 51, 61.
args: [rule: size_t]
methods:
integrate:
name_cpp: r_integrate
args: [f: SEXP, a: double, b: double]
return_type: double
integrate_vector_x:
args: [a: double, b: double]
return_type: "std::vector<double>"
integrate_vector:
args: [y: "std::vector<double>", a: double, b: double]
return_type: double
active:
last_area: {type: double, access: member, name_cpp: get_last_area}
last_error: {type: double, access: member, name_cpp: get_last_error}
last_area_abs: {type: double, access: member, name_cpp: get_last_area_abs}
last_area_asc: {type: double, access: member, name_cpp: get_last_area_asc}
QAG:
name_cpp: "plant::quadrature::QAG"
constructor:
args: [rule: size_t, max_iterations: size_t, atol: double, rtol: double]
methods:
integrate:
return_type: double
name_cpp: r_integrate
args: [f: SEXP, a: double, b: double]
integrate_with_intervals:
return_type: double
name_cpp: r_integrate_with_intervals
args: [f: SEXP, intervals: SEXP]
integrate_with_last_intervals:
return_type: double
name_cpp: r_integrate_with_last_intervals
args: [f: SEXP, a: double, b: double]
active:
last_area: {type: double, access: member, name_cpp: get_last_area}
last_error: {type: double, access: member, name_cpp: get_last_error}
last_iterations: {type: size_t, access: member, name_cpp: get_last_iterations}
last_intervals: {type: "plant::quadrature::intervals_type", access: member, name_cpp: get_last_intervals}
is_adaptive: {type: bool, access: member}
Interpolator:
name_cpp: "plant::interpolator::Interpolator"
constructor:
roxygen: |
Spline interpolation
@export
methods:
init:
return_type: void
args: [x: "const std::vector<double>&", y: "const std::vector<double>&"]
eval:
return_type: "std::vector<double>"
args: [x: "std::vector<double>"]
name_cpp: r_eval
active:
x: {type: "std::vector<double>", access: member, name_cpp: get_x}
y: {type: "std::vector<double>", access: member, name_cpp: get_y}
xy: {type: SEXP, access: member, name_cpp: r_get_xy}
size: {type: size_t, access: member}
min: {type: double, access: member}
max: {type: double, access: member}
Environment:
name_cpp: "plant::Environment"
constructor:
args: [disturbance_mean_interval: double, seed_rain: "std::vector<double>", control: "plant::Control"]
roxygen: |
Environment object
@param disturbance_mean_interval mean disturbance interval in years
@param seed_rain vector of seed rains
@param control A Control object
@export
methods:
canopy_openness:
args: [height: double]
return_type: double
patch_survival_conditional:
args: [time_at_birth: double]
return_type: double
clear:
return_type: void
set_seed_rain_index:
args: [x: "plant::util::index"]
return_type: void
name_cpp: r_set_seed_rain_index
active:
patch_survival: {type: double, access: member}
seed_rain_dt: {type: double, access: member}
disturbance_regime: {type: "plant::Disturbance", access: field}
time: {type: double, access: field}
light_environment: {type: "plant::interpolator::Interpolator", access: field}
Plant_internals:
name_cpp: "plant::Plant_internals"
list:
- area_leaf: double
- height: double
- height_dt: double
- mortality: double
- mortality_dt: double
- fecundity: double
- fecundity_dt: double
- area_heartwood: double
- area_heartwood_dt: double
- mass_heartwood: double
- mass_heartwood_dt: double
Plant:
name_cpp: "plant::Plant<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [s: T]
name_cpp: "plant::make_plant<T>"
roxygen: |
Plant object
@param T String containing class of plant to create; currently
must be \code{"FF16"}. See \code{\link{FF16_Plant}} for more
details.
@export
active:
height: {type: double, access: member, name_cpp: height, name_cpp_set: set_height}
mortality: {type: double, access: member, name_cpp_set: set_mortality}
fecundity: {type: double, access: member, name_cpp_set: set_fecundity}
strategy: {type: "T", access: member, name_cpp: r_get_strategy}
internals: {type: "plant::Plant<T>::internals", access: member, name_cpp: "r_internals"}
ode_size: {type: size_t, access: member}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state", name_cpp_set: "plant::ode::r_set_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
ode_names: {type: "std::vector<std::string>", access: member}
mortality_probability: {type: double, access: member}
strategy_name: {type: "std::string", access: member}
methods:
area_leaf_above:
args: [h: double]
return_type: double
compute_vars_phys:
args: [environment: "const plant::Environment&"]
return_type: void
germination_probability:
args: [environment: "const plant::Environment&"]
return_type: double
reset_mortality:
return_type: void
PlantRunner:
name_cpp: "plant::tools::PlantRunner<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
name_cpp: "plant::tools::PlantRunner<T>"
args: [plant: "plant::PlantPlus<T>", environment: "plant::Environment"]
active:
plant: {access: field, type: "plant::PlantPlus<T>"}
FF16_Strategy:
name_cpp: "plant::FF16_Strategy"
roxygen: |
Strategy parameters that tune various aspects of the biological model.
@title Strategy parameters
@param ...,values Values to initialise the struct with (either as
variadic arguments, or as a list, but not both).
@export
list:
- lma: double
- rho: double
- hmat: double
- omega: double
- eta: double
- theta: double
- a_l1: double
- a_l2: double
- a_r1: double
- a_b1: double
- r_s: double
- r_b: double
- r_r: double
- r_l: double
- a_y: double
- a_bio: double
- k_l: double
- k_b: double
- k_s: double
- k_r: double
- a_p1: double
- a_p2: double
- a_f3: double
- a_f1: double
- a_f2: double
- S_D: double
- a_d0: double
- d_I: double
- a_dG1: double
- a_dG2: double
- control: "plant::Control"
FF16r_Strategy:
name_cpp: "plant::FF16r_Strategy"
roxygen: |
Strategy parameters that tune various aspects of the biological model.
@title Strategy parameters
@param ...,values Values to initialise the struct with (either as
variadic arguments, or as a list, but not both).
@export
list:
- lma: double
- rho: double
- hmat: double
- omega: double
- eta: double
- theta: double
- a_l1: double
- a_l2: double
- a_r1: double
- a_b1: double
- r_s: double
- r_b: double
- r_r: double
- r_l: double
- a_y: double
- a_bio: double
- k_l: double
- k_b: double
- k_s: double
- k_r: double
- a_p1: double
- a_p2: double
- a_f3: double
- a_f1: double
- a_f2: double
- S_D: double
- a_d0: double
- d_I: double
- a_dG1: double
- a_dG2: double
- control: "plant::Control"
Parameters:
name_cpp: "plant::Parameters<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
# TODO: This is broken:
# roxygen: |
# Strategy parameters that tune various aspects of the biological model.
# @title Strategy parameters
# @param ...,values Values to initialise the struct with (either as
# variadic arguments, or as a list, but not both).
# @export
validator:
name_cpp: validate
list:
- k_I: double
- patch_area: double
- n_patches: size_t
- disturbance_mean_interval: double
- strategies: "std::vector<T>"
- seed_rain: "std::vector<double>"
- is_resident: "std::vector<bool>"
- control: "plant::Control"
- strategy_default: "T"
- cohort_schedule_max_time: double
- cohort_schedule_times_default: "std::vector<double>"
- cohort_schedule_times: "std::vector<std::vector<double> >"
- cohort_schedule_ode_times: "std::vector<double>"
- hyperpar: SEXP
PlantPlus:
name_cpp: "plant::PlantPlus<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
name_cpp: "plant::make_plant_plus<T>"
args: [strategy: T]
roxygen: |
PlantPlus object
@param T String containing class of plant to create; currently
must be \code{"FF16"}. See \code{\link{FF16_Plant}} for more
details.
@export
active:
height: {type: double, access: member, name_cpp: height, name_cpp_set: set_height}
# Possibly these four should be read-only?
mortality: {type: double, access: member, name_cpp_set: set_mortality}
fecundity: {type: double, access: member, name_cpp_set: set_fecundity}
area_heartwood: {type: double, access: member, name_cpp_set: set_area_heartwood}
mass_heartwood: {type: double, access: member, name_cpp_set: set_mass_heartwood}
area_leaf: {type: double, access: member}
strategy: {type: "T", access: member, name_cpp: r_get_strategy}
internals: {type: "plant::PlantPlus_internals", access: member, name_cpp: "r_internals"}
ode_size: {type: size_t, access: member}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state", name_cpp_set: "plant::ode::r_set_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
ode_names: {type: "std::vector<std::string>", access: member}
strategy_name: {type: "std::string", access: member}
methods:
area_leaf_above:
args: [h: double]
return_type: double
compute_vars_phys:
args: [environment: "const plant::Environment&"]
return_type: void
compute_vars_growth:
return_type: void
germination_probability:
args: [environment: "const plant::Environment&"]
return_type: double
to_plant:
return_type: "plant::Plant<T>"
PlantPlus_internals:
name_cpp: "plant::PlantPlus_internals"
list:
- mass_leaf: double
- area_leaf: double
- height: double
- area_sapwood: double
- mass_sapwood: double
- area_bark: double
- mass_bark: double
- area_heartwood: double
- mass_heartwood: double
- area_stem: double
- mass_root: double
- mass_live: double
- mass_total: double
- mass_above_ground: double
- diameter_stem: double
- assimilation: double
- respiration: double
- turnover: double
- net_mass_production_dt: double
- fraction_allocation_reproduction: double
- fraction_allocation_growth: double
- fecundity_dt: double
- area_leaf_dt: double
- darea_leaf_dmass_live: double
- height_dt: double
- area_heartwood_dt: double
- mass_heartwood_dt: double
- mortality_dt: double
- mortality: double
- fecundity: double
- dheight_darea_leaf: double
- dmass_sapwood_darea_leaf: double
- dmass_bark_darea_leaf: double
- dmass_root_darea_leaf: double
- area_sapwood_dt: double
- area_bark_dt: double
- area_stem_dt: double
- ddiameter_stem_darea_stem: double
- diameter_stem_dt: double
- mass_root_dt: double
- mass_live_dt: double
- mass_total_dt: double
- mass_above_ground_dt: double
Cohort:
name_cpp: "plant::Cohort<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
name_cpp: "plant::make_cohort<T>"
args: [strategy: T]
active:
plant: {type: "plant::Plant<T>", access: field, readonly: true}
height: {type: double, access: member}
log_density: {type: double, access: member, name_cpp: get_log_density}
area_leaf: {type: double, access: member}
fecundity: {type: double, access: member}
ode_size: {type: size_t, access: member}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state", name_cpp_set: "plant::ode::r_set_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
ode_names: {type: "std::vector<std::string>", access: member}
methods:
area_leaf_above:
return_type: double
args: [height: double]
growth_rate_gradient:
return_type: double
name_cpp: "r_growth_rate_gradient"
args: [environment: "const plant::Environment&"]
compute_vars_phys:
return_type: void
args: [environment: "const plant::Environment&"]
compute_initial_conditions:
return_type: void
args: [environment: "const plant::Environment&"]
# For now, also not templated
Species:
name_cpp: "plant::Species<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [strategy: T]
active:
size: {type: size_t, access: member}
seed: {type: "plant::Cohort<T>", access: member, name_cpp: r_seed}
height_max: {type: double, access: member, readonly: true}
heights: {type: "std::vector<double>", access: member, name_cpp: r_heights, name_cpp_set: r_set_heights}
log_densities: {type: "std::vector<double>", access: member, name_cpp: r_log_densities}
cohorts: {type: "std::vector<plant::Cohort<T> >", access: member, name_cpp: r_cohorts}
seeds: {type: "std::vector<double>", access: member}
area_leafs: {type: "std::vector<double>", access: member, name_cpp: r_area_leafs}
## ODE interface:
ode_size: {type: size_t, access: member}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state", name_cpp_set: "plant::ode::r_set_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
methods:
clear:
return_type: void
compute_vars_phys:
return_type: void
args: [environment: "const plant::Environment&"]
area_leaf_above:
return_type: double
args: [height: double]
add_seed:
return_type: void
cohort_at:
return_type: "plant::Cohort<T>"
args: [index: "plant::util::index"]
name_cpp: r_cohort_at
area_leafs_error:
return_type: "std::vector<double>"
args: [scal: double=1]
name_cpp: r_area_leafs_error
Patch:
name_cpp: "plant::Patch<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [parameters: "plant::Parameters<T>"]
active:
time: {type: double, access: member}
size: {type: size_t, access: member}
height_max: {type: double, access: member}
parameters: {type: "plant::Parameters<T>", access: member, name_cpp: r_parameters}
environment: {type: "plant::Environment", access: member, name_cpp: r_environment}
species: {type: "std::vector<plant::Species<T> >", access: member, name_cpp: r_species}
## ODE interface:
ode_size: {type: size_t, access: member}
ode_time: {type: double, access: function, name_cpp: "plant::ode::r_ode_time"}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
methods:
area_leaf_above: {return_type: double, args: [height: double]}
canopy_openness: {return_type: double, args: [height: double]}
add_seed:
return_type: void
args: [species_index: "plant::util::index"]
name_cpp: r_add_seed
compute_light_environment:
return_type: void
name_cpp: r_compute_light_environment
compute_vars_phys:
return_type: void
name_cpp: r_compute_vars_phys
# TODO: Not 100% sure this is needed from R:
reset:
return_type: void
# Because we now care about time, we need to make sure that the
# setter function passes time along, so can't be done via the
# active binding (unlike Species, Cohort, etc).
set_ode_state:
return_type: void
access: function
name_cpp: "plant::ode::r_set_ode_state"
args: [values: "plant::ode::state_type", time: double]
derivs:
return_type: "plant::ode::state_type"
access: function
name_cpp: "plant::ode::r_derivs"
args: [y: "const plant::ode::state_type&", time: double]
set_state:
args: [time: double, state: "const std::vector<double>&", n: "const std::vector<size_t>&", light_env: "const std::vector<double>&"]
name_cpp: r_set_state
return_type: void
SCM:
name_cpp: "plant::SCM<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [parameters: "plant::Parameters<T>"]
methods:
run:
return_type: void
run_next:
return_type: "std::vector<plant::util::index>"
name_cpp: r_run_next
reset:
return_type: void
seed_rain:
args: [species_index: "plant::util::index"]
return_type: double
name_cpp: r_seed_rain
seed_rain_cohort:
args: [species_index: "plant::util::index"]
return_type: "std::vector<double>"
name_cpp: r_seed_rain_cohort
area_leaf_error:
args: [species_index: "plant::util::index"]
return_type: "std::vector<double>"
name_cpp: r_area_leaf_error
set_cohort_schedule_times:
args: [times: "std::vector<std::vector<double> >"]
return_type: void
name_cpp: r_set_cohort_schedule_times
# times
# set_times
active:
complete: {type: bool, access: member}
time: {type: double, access: member}
seed_rains: {type: "std::vector<double>", access: member}
parameters: {type: "plant::Parameters<T>", access: member, name_cpp: r_parameters}
patch:
type: "plant::Patch<T>"
access: member
name_cpp: r_patch
cohort_schedule:
type: "plant::CohortSchedule"
access: member
name_cpp: r_cohort_schedule
name_cpp_set: r_set_cohort_schedule
ode_times:
type: "std::vector<double>"
access: member
name_cpp: r_ode_times
state:
type: "Rcpp::List"
access: function
name_cpp: "plant::get_state"
use_ode_times:
type: bool
access: member
name_cpp: r_use_ode_times
name_cpp_set: r_set_use_ode_times
seed_rain_error:
type: "std::vector<std::vector<double> >"
access: member
name_cpp: r_seed_rain_error
StochasticSpecies:
name_cpp: "plant::StochasticSpecies<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [strategy: "T"]
active:
size: {type: size_t, access: member}
size_plants: {type: size_t, access: member}
seed: {type: "plant::Plant<T>", access: member, name_cpp: r_seed}
height_max: {type: double, access: member, readonly: true}
heights: {type: "std::vector<double>", access: member, name_cpp: r_heights, name_cpp_set: r_set_heights}
plants: {type: "std::vector<plant::Plant<T> >", access: member, name_cpp: r_plants}
is_alive: {type: "std::vector<bool>", access: member, name_cpp: r_is_alive}
seeds: {type: "std::vector<double>", access: member}
## ODE interface:
ode_size: {type: size_t, access: member}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state", name_cpp_set: "plant::ode::r_set_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
methods:
clear:
return_type: void
compute_vars_phys:
return_type: void
args: [environment: "const plant::Environment&"]
area_leaf_above:
return_type: double
args: [height: double]
add_seed:
return_type: void
plant_at:
return_type: "plant::Plant<T>"
args: [index: "plant::util::index"]
name_cpp: r_plant_at
deaths:
return_type: size_t
germination_probability:
args: [environment: "const plant::Environment&"]
return_type: double
StochasticPatch:
name_cpp: "plant::StochasticPatch<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [parameters: "plant::Parameters<T>"]
active:
time: {type: double, access: member}
size: {type: size_t, access: member}
height_max: {type: double, access: member}
parameters: {type: "plant::Parameters<T>", access: member, name_cpp: r_parameters}
environment: {type: "plant::Environment", access: member, name_cpp: r_environment}
species: {type: "std::vector<plant::StochasticSpecies<T> >", access: member, name_cpp: r_species}
## ODE interface:
ode_size: {type: size_t, access: member}
ode_time: {type: double, access: function, name_cpp: "plant::ode::r_ode_time"}
ode_state: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_state"}
ode_rates: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_rates"}
methods:
area_leaf_above: {return_type: double, args: [height: double]}
canopy_openness: {return_type: double, args: [height: double]}
add_seed:
return_type: bool
args: [species_index: "plant::util::index"]
name_cpp: r_add_seed
add_seedling:
return_type: void
args: [species_index: "plant::util::index"]
name_cpp: r_add_seedling
compute_light_environment:
return_type: void
name_cpp: r_compute_light_environment
compute_vars_phys:
return_type: void
name_cpp: r_compute_vars_phys
# TODO: Not 100% sure this is needed from R:
reset:
return_type: void
# Because we now care about time, we need to make sure that the
# setter function passes time along, so can't be done via the
# active binding (unlike Species, Cohort, etc).
set_ode_state:
return_type: void
access: function
name_cpp: "plant::ode::r_set_ode_state"
args: [values: "plant::ode::state_type", time: double]
derivs:
return_type: "plant::ode::state_type"
access: function
name_cpp: "plant::ode::r_derivs"
args: [y: "const plant::ode::state_type&", time: double]
set_state:
args: [time: double, state: "const std::vector<double>&", n: "const std::vector<size_t>&"]
name_cpp: r_set_state
return_type: void
deaths:
return_type: "std::vector<size_t>"
StochasticPatchRunner:
name_cpp: "plant::StochasticPatchRunner<T>"
templates:
parameters: T
concrete:
- ["FF16": "plant::FF16_Strategy"]
- ["FF16r": "plant::FF16r_Strategy"]
constructor:
args: [parameters: "plant::Parameters<T>"]
methods:
run:
return_type: void
run_next:
return_type: plant::util::index
name_cpp: r_run_next
reset:
return_type: void
set_schedule_times:
args: [times: "std::vector<std::vector<double> >"]
return_type: void
name_cpp: r_set_schedule_times
active:
complete: {type: bool, access: member}
time: {type: double, access: member}
parameters: {type: "plant::Parameters<T>", access: member, name_cpp: r_parameters}
patch:
type: "plant::StochasticPatch<T>"
access: member
name_cpp: r_patch
schedule:
type: "plant::CohortSchedule"
access: member
name_cpp: r_schedule
name_cpp_set: r_set_schedule
state:
type: "Rcpp::List"
access: function
name_cpp: "plant::get_state"