-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-steady-state models #114
Comments
To give other potential examples of non-steady state models (besides pruning) :
Some of these might affect the MTG in much more drastic ways than 'simply' removing a branch. Also, some other interactions (root fusing) could also be modelled in a non-steady state manner, perhaps ? |
Additionally, there is a need to be clear regarding the behaviour of later models making use of variables computed off the MTG if ever the decision is made to opt for a different approach (for instance, a biomass-dependent variable, is it or isn't it affected by the sudden change in biomass ?) |
Another potential pitfall that has just come to mind : Some nasty corner-cases are likely to occur and need to be handled. For instance, what if a model creates a leaf that is then immediately pruned ? How is that reflected in the outputs ? The non-steady state stage seems like it would deal with this example without many issues, but it's quite likely some other subtle interactions could cause some very tricky behaviour to happen. |
Some models are non-steady-state, because they change abruptly the state of the system, e.g. they modify the inputs they are given (see #107), or they remove nodes from the plant graph.
This is a problem in the current implementation of PlantSimEngine, because it is not allowed to:
A solution to 1. would be to provide a function
remove_node!
that does the reverse ofadd_node!
, that is to say, delete a node from the plant graph, delete it from the vector of nodes at its scale, and delete the references to its variables in other multiscale variables.A potential solution to 2. would be to define some models as "non-steady-state" (e.g. using a trait). Those models would be applied without a dependency graph (as is) after all other models, and would be authorized to update the state of variables. For example in XPalm, when a leaf is harvested, we keep its node in the plant graph, but we change its state in the status, and we update some variables accordingly (e.g. biomass = 0.0, litter = previous biomass). This is forbidden in PlantSimEngine, so we use a trick: we don't put updated variables as outputs of the model (just inputs). The risk here is that we may call the model at a wrong time.
The text was updated successfully, but these errors were encountered: