CSR Growth

From VLECK
Jump to: navigation, search

In the growth per plant organ, first the amount of product and building blocks are calculated, based on the share of available glucode in the metabolic pool, as if no limitations exist. Next, the most limiting building block reduces the amount of glucose actually used for growth. After this the building blocks are transfered from the supplier (Metabolic Pool) to the organ's states.

Finally, the water produced during growth is returned to the supplier.


 
def grow(self, share, availableResourceStates):
    """
    turn NPP into bodymass
    @param share: share of resources available
    @param availableResourceStates: available dict (State) [mol]
    """
    unlimited = self._getUnlimitedGrowth()  # [mol]
    for source in unlimited:
      # available glucose equals 1/6th of available C:
      multiplyDictionary(unlimited[source], share * availableResourceStates['carbon'].value / 6) # [mol]
 
    realized = self._implyResourceLimitation(unlimited, share, availableResourceStates)
 
    # note thate it is quite possible that either side products or limitiations of one
    # compound can slacken the constraints on others. With the curent set of constituent
    # definitions, this is unlikely to become the case with N-sources, but quite probable
    # for glucose that will be left over after N-limitation.
 
    # transfering mass from sources to destinations:
    self.states['carbon'].transferFrom(availableResourceStates['carbon'], -6* realized['glucose'])
 
    for c in CompoundConversion.supported_N_sources:
      if realized.has_key(c):
        self.states[c].transferFrom(availableResourceStates[c], -realized[c])
 
    availableResourceStates['water'].transferFrom(biomass_bound, realized['water']) # may also be negative