traitecoevo / plant

Trait-Driven Models of Ecology and Evolution :evergreen_tree:
https://traitecoevo.github.io/plant
53 stars 20 forks source link

Update scaffolder for strategy inheritance #274

Open aornugent opened 3 years ago

aornugent commented 3 years ago

The new approach to model inheritance (#267) requires some changes to the scaffolder.

aornugent commented 3 years ago

The inherited environmental also needs to be registered by the scaffolder. We can see why in the test-cohort.R logic:

for (x in names(strategy_types)) {
  s <- strategy_types[[x]]()
  e <- environment_types[[x]]
  ...
}

where the FF16r environment has been registered, but not FF16ppa:

> names(strategy_types)
[1] "FF16"    "FF16ppa" "FF16r"   "K93"    
> environment_types
$FF16
[1] "FF16_Env"

$FF16r
[1] "FF16_Env"

$K93
[1] "K93_Env"

EDIT: this part should be resolved in #289.