-
Notifications
You must be signed in to change notification settings - Fork 20
/
RcppR6_classes.yml
1261 lines (1223 loc) · 41.6 KB
/
RcppR6_classes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Leaf:
name_cpp: "plant::Leaf"
constructor:
args:
- vcmax_25: double
- c: double
- b: double
- psi_crit: double
- jmax_25: double
- hk_s: double
- a: double
- curv_fact_elec_trans: double
- curv_fact_colim: double
- GSS_tol_abs: double
- vulnerability_curve_ncontrol: double
- ci_abs_tol: double
- ci_niter: double
active:
ci_: {type: double, access: field}
stom_cond_CO2_: {type: double, access: field}
assim_colimited_: {type: double, access: field}
transpiration_: {type: double, access: field}
profit_: {type: double, access: field}
psi_stem: {type: double, access: field}
lambda_: {type: double, access: field}
lambda_analytical_: {type: double, access: field}
electron_transport_: {type: double, access: field}
gamma_: {type: double, access: field}
ko_: {type: double, access: field}
kc_: {type: double, access: field}
km_: {type: double, access: field}
R_d_: {type: double, access: field}
leaf_specific_conductance_max_: {type: double, access: field}
vcmax_: {type: double, access: field}
jmax_: {type: double, access: field}
rho_: {type: double, access: field}
a_bio_: {type: double, access: field}
PPFD_: {type: double, access: field}
atm_vpd_: {type: double, access: field}
ca_: {type: double, access: field}
psi_soil_: {type: double, access: field}
leaf_temp_: {type: double, access: field}
atm_o2_kpa_: {type: double, access: field}
atm_kpa_: {type: double, access: field}
hydraulic_cost_: {type: double, access: field}
opt_psi_stem_: {type: double, access: field}
opt_ci_: {type: double, access: field}
count: {type: double, access: field}
methods:
initialize_integrator:
return_type: void
args: [integration_rule: int, integration_tol: double]
set_physiology:
return_type: void
args: [rho: double, a_bio: double, PPFD: double, psi_soil: double, leaf_specific_conductance_max: double, atm_vpd: double, ca: double, sapwood_volume_per_leaf_area: double, leaf_temp: double, atm_o2_kpa: double, atm_kpa: double]
#transpiration functions
proportion_of_conductivity:
return_type: double
args: [psi: double]
arrh_curve:
return_type: double
args: [Ea: double, ref_value: double, leaf_temp: double]
peak_arrh_curve:
return_type: double
args: [Ea: double, ref_value: double, leaf_temp: double, H_d: double, d_S: double]
transpiration:
return_type: double
args: [psi_stem: double]
transpiration_full_integration:
return_type: double
args: [psi_stem: double]
stom_cond_CO2:
return_type: double
args: [psi_stem: double]
transpiration_to_psi_stem:
return_type: double
args: [transpiration_: double]
# assimilation functions
assim_rubisco_limited:
return_type: double
args: [ci_: double]
assim_electron_limited:
return_type: double
args: [ci_: double]
assim_colimited:
return_type: double
args: [ci_: double]
assim_minus_stom_cond_CO2:
return_type: double
args: [x: double, psi_stem: double]
electron_transport:
return_type: double
args: []
set_leaf_states_rates_from_psi_stem:
return_type: void
args: [psi_stem: double]
psi_stem_to_ci:
return_type: double
args: [psi_stem: double]
#leaf economics functions
hydraulic_cost_Sperry:
return_type: double
args: [psi_stem: double]
hydraulic_cost_TF:
return_type: double
args: [psi_stem: double]
profit_psi_stem_Sperry:
return_type: double
args: [psi_stem: double]
profit_Sperry_ci:
return_type: double
args: [ci_: double]
profit_psi_stem_TF:
return_type: double
args: [psi_stem: double]
# optimiser functions
optimise_psi_stem_Sperry:
return_type: void
args: []
optimise_ci_Sperry:
return_type: void
args: [max_ci: double]
optimise_psi_stem_TF:
return_type: void
args: []
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::IndividualRunner<plant::FF16_Strategy, plant::FF16_Environment>"]
- ["FF16w": "plant::tools::IndividualRunner<plant::FF16w_Strategy, plant::FF16_Environment>"]
- ["FF16r": "plant::tools::IndividualRunner<plant::FF16r_Strategy, plant::FF16_Environment>"]
- ["K93": "plant::tools::IndividualRunner<plant::K93_Strategy, plant::K93_Environment>"]
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}
NodeScheduleEvent:
name_cpp: "plant::NodeScheduleEvent"
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}
NodeSchedule:
name_cpp: "plant::NodeSchedule"
constructor:
roxygen: |
Schedule of node 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::NodeScheduleEvent", 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::NodeSchedule"
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::NodeSchedule"
name_cpp: r_copy
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:
- assimilator_adaptive_integration: bool
- assimilator_integration_tol: double
- assimilator_integration_iterations: size_t
- assimilator_integration_rule: size_t
- offspring_production_tol: double
- offspring_production_iterations: int
- node_gradient_eps: double
- node_gradient_direction: int
- node_gradient_richardson: bool
- node_gradient_richardson_depth: size_t
- 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
- equilibrium_nsteps: size_t
- equilibrium_eps: double
- equilibrium_large_birth_rate_change: double
- equilibrium_verbose: bool
- equilibrium_solver_name: "std::string"
- equilibrium_extinct_birth_rate: double
- equilibrium_nattempts: int
- equilibrium_solver_logN: bool
- equilibrium_solver_try_keep: bool
- save_RK45_cache: bool
- GSS_tol_abs: double
- vulnerability_curve_ncontrol: double
- ci_abs_tol: double
- ci_niter: double
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
set_extrapolate:
return_type: void
args: [e: bool]
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}
Individual:
name_cpp: "plant::Individual<T,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args: [s: T]
name_cpp: "plant::make_individual<T,E>"
roxygen: |
Individual object
@param T String containing class of plant strategy to create;
@param E String containing class of environmnet to create;
@export
active:
strategy: {type: "T", access: member, name_cpp: r_get_strategy}
internals: {type: "plant::Internals", access: member, name_cpp: "r_internals"}
aux_size: {type: size_t, access: member}
ode_size: {type: size_t, access: member}
ode_names: {type: "std::vector<std::string>", access: member}
aux_names: {type: "std::vector<std::string>", 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"}
mortality_probability: {type: double, access: member}
strategy_name: {type: "std::string", access: member}
methods:
state:
args: [name: "std::string"]
return_type: double
rate:
args: [name: "std::string"]
return_type: double
aux:
args: [name: "std::string"]
return_type: double
set_state:
args: [name: "std::string", v: double]
return_type: void
compute_competition:
args: [h: double]
return_type: double
compute_rates:
args: [environment: E]
return_type: void
establishment_probability:
args: [environment: E]
return_type: double
net_mass_production_dt:
args: [environment: E]
return_type: double
reset_mortality:
return_type: void
resource_compensation_point:
args: []
return_type: double
IndividualRunner:
name_cpp: "plant::tools::IndividualRunner<T,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
name_cpp: "plant::tools::IndividualRunner<T,E>"
args: [individual: "plant::Individual<T,E>", environment: E]
active:
individual: {access: field, type: "plant::Individual<T,E>"}
Internals:
name_cpp: "plant::Internals"
constructor:
args: [s_size: size_t, a_size: size_t]
roxygen: |
Internals class holding vectors of states, thier associated rates and auxiliary (aux) state
which is calculated from the state through running compute_rates
@title Extract Internals from plant object
@param s_size ???
@param a_size ???
@export
active:
state_size: {type: size_t, access: field}
aux_size: {type: size_t, access: field}
states: {type: "std::vector<double>", access: field}
rates: {type: "std::vector<double>", access: field}
auxs: {type: "std::vector<double>", access: field}
methods:
state:
args: [i: int]
return_type: double
rate:
args: [i: int]
return_type: double
aux:
args: [i: int]
return_type: double
set_aux:
args: [i: int, v: double]
return_type: void
set_state:
args: [i: int, v: double]
return_type: void
set_rate:
args: [i: int, v: double]
return_type: void
resize:
args: [new_size: size_t, new_aux_size: size_t]
return_type: void
Parameters:
name_cpp: "plant::Parameters<T,E>"
templates:
parameters: [T, E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
validator:
name_cpp: validate
list:
- patch_area: double
- n_patches: size_t
- patch_type: "std::string"
- max_patch_lifetime: double
- strategies: "std::vector<T>"
- strategy_default: "T"
- node_schedule_times_default: "std::vector<double>"
- node_schedule_times: "std::vector<std::vector<double> >"
- node_schedule_ode_times: "std::vector<double>"
Node:
name_cpp: "plant::Node<T,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
name_cpp: "plant::make_node<T,E>"
args: [strategy: T]
active:
individual: {type: "plant::Individual<T,E>", access: field, readonly: true}
height: {type: double, access: member}
log_density: {type: double, access: member, name_cpp: get_log_density}
competition_effect: {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:
compute_competition:
return_type: double
args: [height: double]
growth_rate_gradient:
return_type: double
name_cpp: "r_growth_rate_gradient"
args: [environment: E]
compute_rates:
return_type: void
args: [environment: E, pr_patch_survival: double]
compute_initial_conditions:
return_type: void
args: [environment: E, pr_patch_survival: double, birth_rate: double]
# For now, also not templated
Species:
name_cpp: "plant::Species<T,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args: [strategy: T]
active:
size: {type: size_t, access: member}
new_node: {type: "plant::Node<T,E>", access: member, name_cpp: r_new_node}
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}
nodes: {type: "std::vector<plant::Node<T,E> >", access: member, name_cpp: r_nodes}
net_reproduction_ratio_by_node: {type: "std::vector<double>", access: member}
competition_effects: {type: "std::vector<double>", access: member, name_cpp: r_competition_effects}
extrinsic_drivers: {type: "plant::ExtrinsicDrivers", access: member, name_cpp: extrinsic_drivers}
## 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_rates:
return_type: void
args: [environment: E, pr_patch_survival: double, birth_rate: double]
compute_competition:
return_type: double
args: [height: double]
introduce_new_node:
return_type: void
node_at:
return_type: "plant::Node<T,E>"
args: [index: "plant::util::index"]
name_cpp: r_node_at
competition_effects_error:
return_type: "std::vector<double>"
args: [scal: double=1]
name_cpp: r_competition_effects_error
Patch:
name_cpp: "plant::Patch<T,E>"
templates:
parameters: [T, E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args:
- parameters: "plant::Parameters<T,E>"
- environment: "E"
- control: "plant::Control"
active:
time: {type: double, access: member}
size: {type: size_t, access: member}
height_max: {type: double, access: member}
parameters: {type: "plant::Parameters<T,E>", access: member, name_cpp: r_parameters}
environment: {type: E, access: member, name_cpp: r_environment}
species: {type: "std::vector<plant::Species<T,E> >", 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"}
ode_aux: {type: "plant::ode::state_type", access: function, name_cpp: "plant::ode::r_ode_aux"}
node_ode_size: {type: size_t, access: member}
methods:
introduce_new_node:
return_type: void
args: [species_index: "plant::util::index"]
name_cpp: r_introduce_new_node
compute_environment:
return_type: void
name_cpp: r_compute_environment
compute_rates:
return_type: void
name_cpp: r_compute_rates
# 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, Node, 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_time:
args: [time: double]
name_cpp: r_set_time
return_type: void
set_state:
args: [time: double, state: "const std::vector<double>&", n: "const std::vector<size_t>&", env: "const std::vector<double>&"]
name_cpp: r_set_state
return_type: void
# Disturbance interface
density: {return_type: "std::vector<double>", args: [time: "std::vector<double>"], name_cpp: r_density}
pr_survival: {return_type: double, args: [time: double], name_cpp: r_pr_survival}
disturbance_mean_interval: {return_type: double, name_cpp: r_disturbance_mean_interval}
survival_weighting_cdf: {return_type: double, args: [time: double], name_cpp: r_survival_weighting_cdf}
survival_weighting_icdf: {return_type: double, args: [prob: double], name_cpp: r_survival_weighting_icdf}
compute_competition: {return_type: double, args: [height: double]}
SCM:
name_cpp: "plant::SCM<T,E>"
templates:
parameters: [T, E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args:
- parameters: "plant::Parameters<T,E>"
- environment: "E"
- control: "plant::Control"
methods:
run:
return_type: void
run_mutant:
args: [p: "plant::Parameters<T,E>"]
return_type: void
run_next:
return_type: "std::vector<plant::util::index>"
name_cpp: r_run_next
reset:
return_type: void
net_reproduction_ratio_for_species:
args: [species_index: "plant::util::index"]
return_type: double
name_cpp: r_net_reproduction_ratio_for_species
competition_effect_error:
args: [species_index: "plant::util::index"]
return_type: "std::vector<double>"
name_cpp: r_competition_effect_error
set_node_schedule_times:
args: [times: "std::vector<std::vector<double>>"]
return_type: void
name_cpp: r_set_node_schedule_times
# times
# set_times
active:
complete: {type: bool, access: member}
time: {type: double, access: member}
net_reproduction_ratios: {type: "std::vector<double>", access: member}
offspring_production: {type: "std::vector<double>", access: member}
parameters: {type: "plant::Parameters<T,E>", access: member, name_cpp: r_parameters}
patch:
type: "plant::Patch<T,E>"
access: member
name_cpp: r_patch
node_schedule:
type: "plant::NodeSchedule"
access: member
name_cpp: r_node_schedule
name_cpp_set: r_set_node_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"
aux:
type: "Rcpp::List"
access: function
name_cpp: "plant::get_aux"
use_ode_times:
type: bool
access: member
name_cpp: r_use_ode_times
name_cpp_set: r_set_use_ode_times
net_reproduction_ratio_errors:
type: "std::vector<std::vector<double>>"
access: member
name_cpp: r_net_reproduction_ratio_errors
StochasticSpecies:
name_cpp: "plant::StochasticSpecies<T,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args: [strategy: "T"]
active:
size: {type: size_t, access: member}
size_individuals: {type: size_t, access: member}
new_node: {type: "plant::Individual<T,E>", access: member, name_cpp: r_new_node}
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}
individuals: {type: "std::vector<plant::Individual<T,E> >", access: member, name_cpp: r_individuals}
is_alive: {type: "std::vector<bool>", access: member, name_cpp: r_is_alive}
net_reproduction_ratio_by_node: {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_rates:
return_type: void
args: [environment: E]
compute_competition:
return_type: double
args: [height: double]
introduce_new_node:
return_type: void
individual_at:
return_type: "plant::Individual<T,E>"
args: [index: "plant::util::index"]
name_cpp: r_individual_at
deaths:
return_type: size_t
establishment_probability:
args: [environment: E]
return_type: double
StochasticPatch:
name_cpp: "plant::StochasticPatch<T,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args:
- parameters: "plant::Parameters<T,E>"
- environment: "E"
- control: "plant::Control"
active:
time: {type: double, access: member}
size: {type: size_t, access: member}
height_max: {type: double, access: member}
parameters: {type: "plant::Parameters<T,E>", access: member, name_cpp: r_parameters}
environment: {type: E, access: member, name_cpp: r_environment}
species: {type: "std::vector<plant::StochasticSpecies<T,E> >", 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:
compute_competition: {return_type: double, args: [height: double]}
introduce_new_node:
return_type: bool
args: [species_index: "plant::util::index"]
name_cpp: r_introduce_new_node
introduce_new_node_and_update:
return_type: void
args: [species_index: "plant::util::index"]
name_cpp: r_introduce_new_node_and_update
compute_environment:
return_type: void
name_cpp: r_compute_environment
compute_rates:
return_type: void
name_cpp: r_compute_rates
# 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, Node, 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,E>"
templates:
parameters: [T,E]
concrete:
- ["FF16": "plant::FF16_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16w": "plant::FF16w_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["FF16r": "plant::FF16r_Strategy", "FF16_Env": "plant::FF16_Environment"]
- ["K93": "plant::K93_Strategy", "K93_Env": "plant::K93_Environment"]
constructor:
args:
- parameters: "plant::Parameters<T,E>"
- environment: "E"
- control: "plant::Control"
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,E>", access: member, name_cpp: r_parameters}
patch:
type: "plant::StochasticPatch<T,E>"
access: member
name_cpp: r_patch
schedule:
type: "plant::NodeSchedule"
access: member
name_cpp: r_schedule
name_cpp_set: r_set_schedule
state:
type: "Rcpp::List"
access: function
name_cpp: "plant::get_state"
Canopy:
name_cpp: "plant::Canopy"
constructor:
args:
- tol: double
- nbase: double
- max_depth: double
methods:
canopy_openness:
args: [height: double]
return_type: double
clear:
return_type: void
active:
canopy_interpolator: {type: "plant::interpolator::Interpolator", access: field}
Disturbance_Regime:
name_cpp: "plant::Disturbance_Regime"
constructor:
roxygen: |
Base class of representing patch disturbance
@title Disturbance regime
@export
methods:
density:
args: [time: "std::vector<double>"]
return_type: "std::vector<double>"
name_cpp: r_density
pr_survival:
args: [time: double]
return_type: double
No_Disturbance:
name_cpp: "plant::No_Disturbance"
constructor:
roxygen: |
A disturbance-free regime for running individual patches
@title No disturbance regime
No_Disturbance_Regime control object
@export
methods:
density:
args: [time: "std::vector<double>"]
return_type: "std::vector<double>"
name_cpp: r_density
pr_survival:
args: [time: double]
return_type: double
Weibull_Disturbance_Regime:
name_cpp: "plant::Weibull_Disturbance_Regime"
constructor:
args: [max_patch_lifetime: double]
roxygen: |
Weibull_Disturbance_Regime control object.
@title Weibull disturbance regime
The frequency of disturbance in a meta-population of patches follows a Weibull distribution
@param max_patch_lifetime Maximum lifetime of a patch, determines length of a simulation
@export
methods:
density:
args: [time: "std::vector<double>"]
return_type: "std::vector<double>"
name_cpp: r_density
pr_survival:
args: [time: double]
return_type: double
mean_interval:
return_type: double
name_cpp: r_mean_interval
cdf:
args: [time: double]
return_type: double
icdf:
args: [prob: double]
return_type: double
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
- k_I: double