You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The model list would need the XPalm.ReproductiveOrganEmission model, but it is not given. So it should return some information about that when calling to_initialize, at least a warning. But here it works and we catch the error in the simulation when calling run! and get the following error:
`ERROR: type NamedTuple has no field reproductive_organ_emission``
I understand the error, but most users won't.
Note that it works if we call dep(mappin) instead:
julia>dep(mapping)
[ Info: Model SexDetermination from process sex_determination at scale Phytomer needs a model that is a subtype of XPalm.AbstractReproductive_Organ_EmissionModel in process reproductive_organ_emission, but the process is not parameterized in the ModelList.
╭──── Dependency graph ───────────────────────╮
│ ╭──── "Phytomer"=>:sex_dete... ───────╮ │
│ │ ╭──── Main model ─────────────────╮ │ │
│ │ │ Process: sex_determination │ │ │
│ │ │ Model: XPalm.SexDetermination │ │ │
│ │ │ Dep:nothing │ │ │
│ │ ╰─────────────────────────────────╯ │ │
│ ╰───────────────────────────────────────╯ │
╰─────────────────────────────────────────────╯
The dependency graph is acyclic.
The text was updated successfully, but these errors were encountered:
Also one more comment, we don't take into account the multi-scale aspect of model dependencies. Some model dependencies are defined at another scale. This is the case for example for the ReproductiveOrganEmission model in XPalm. The model needs an AbstractFinal_Potential_BiomassModel model as a dependency, but it is in fact one that is computed at the organ scale, so we should check if that model is present at the given scale. The call to the model in the function is here:
There is no error when computing the initialisations when a model has a hard-dependency on another model declared with the
dep
function, e.g.:If we don't give an
AbstractLeaf_RankModel
to the model list, there is no error raised, but we expect one!Concrete example using XPalm:
The model list would need the
XPalm.ReproductiveOrganEmission
model, but it is not given. So it should return some information about that when callingto_initialize
, at least a warning. But here it works and we catch the error in the simulation when callingrun!
and get the following error:`ERROR: type NamedTuple has no field reproductive_organ_emission``
I understand the error, but most users won't.
Note that it works if we call
dep(mappin)
instead:The text was updated successfully, but these errors were encountered: