You are here

Storing values in a nested population model!

I'm not sure I'll be able to describe my problem in a post, much easier to understand with a view of my model, but here goes:

I am modeling a population of "shoots" that vary their growth according to environmental conditions. Each of these shoots also lays down rhizomatous internodes ("nodes") as they grow. The biomass a shoot partitions into a growing "roots%rhizomes" compartment is used to drive the creation of a new internode that is contained within a population submodel for the "nodes" (nested within the "shoot" population model).

I need to be able to store the value of the biomass in the "roots&rhizomes" compartment present at the same time step when a new "node" is born. (Actually, I'd like to store the value multiplied by a conversion factor from weight to length so that each "node" (on each shoot) has a stored length but this is easy once I get past the main issue)

Granted, I have only been thinking about this for an hour or two and I may come up with a solution myself in a few more hours! However, I can't seem to get past the fact that if I link the outside roots&rhizome compartment to a variable within the node submodel that this will change every time step as the plant grows and puts more biomass into its overarching "roots&rhizome" compartment. Hmmm...
Thanks for any tips!

Forums: 

Is that delay function new? I don't recall it from previous versions. Fantastic! So, I used the init_time(1) function to calculate the age of a node. Then I created a new variable "my internode length" within the node submodel. This variable was calculated with the influence of the "roots&rhizome" compartment from the shoot model by the equation: delay(roots&rhizome, myage). Voila! It's probably not a very efficient way of doing this as the variable is updated each timestep, but it is a good fix for now.