Пример #1
0
 /// <summary>Clears some variables.</summary>
 virtual protected void DoDailyCleanup()
 {
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Пример #2
0
 /// <summary>Clears the transferring biomass amounts.</summary>
 private void ClearBiomassFlows()
 {
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Пример #3
0
        protected void OnDoPotentialPlantGrowth(object sender, EventArgs e)
        {
            if (Plant.IsEmerged)
            {
                if (MicroClimatePresent == false)
                {
                    throw new Exception(this.Name + " is trying to calculate water demand but no MicroClimate module is present.  Include a microclimate node in your zone");
                }

                Detached.Clear();
                FRGR   = FRGRFunction.Value();
                Height = HeightFunction.Value();
                //Initialise biomass and nitrogen

                Leaves.Add(new PerrenialLeafCohort());
                if (Leaves.Count == 1)
                {
                    AddNewLeafMaterial(StructuralWt: InitialWtFunction.Value(),
                                       StorageWt: 0,
                                       StructuralN: InitialWtFunction.Value() * MinimumNConc.Value(),
                                       StorageN: InitialWtFunction.Value() * (MaximumNConc.Value() - MinimumNConc.Value()),
                                       SLA: SpecificLeafAreaFunction.Value());
                }

                double LDR = LeafDevelopmentRate.Value();
                foreach (PerrenialLeafCohort L in Leaves)
                {
                    L.Age += LDR;
                }

                StartLive = Live;
                StartNReallocationSupply    = NSupply.Reallocation;
                StartNRetranslocationSupply = NSupply.Retranslocation;
            }
        }
Пример #4
0
        protected void OnDoPotentialPlantGrowth(object sender, EventArgs e)
        {
            if (Plant.IsEmerged)
            {
                Detached.Clear();
                FRGR   = FRGRFunction.Value();
                Height = HeightFunction.Value();
                //Initialise biomass and nitrogen

                Leaves.Add(new PerrenialLeafCohort());
                if (Leaves.Count == 1)
                {
                    AddNewLeafMaterial(StructuralWt: InitialWtFunction.Value(),
                                       StorageWt: 0,
                                       StructuralN: InitialWtFunction.Value() * MinimumNConc.Value(),
                                       StorageN: InitialWtFunction.Value() * (MaximumNConc.Value() - MinimumNConc.Value()),
                                       SLA: SpecificLeafAreaFunction.Value());
                }

                double LDR = LeafDevelopmentRate.Value();
                foreach (PerrenialLeafCohort L in Leaves)
                {
                    L.Age += LDR;
                }

                StartLive = ReflectionUtilities.Clone(Live) as Biomass;
                StartNReallocationSupply    = NSupply.Reallocation;
                StartNRetranslocationSupply = NSupply.Retranslocation;
            }
        }
Пример #5
0
 protected void OnDoDailyInitialisation(object sender, EventArgs e)
 {
     if (Plant.IsAlive)
     {
         Allocated.Clear();
         Senesced.Clear();
         Detached.Clear();
         Removed.Clear();
     }
 }
Пример #6
0
 /// <summary>Clears this instance.</summary>
 protected void Clear()
 {
     Height = 0;
     StartNRetranslocationSupply = 0;
     StartNReallocationSupply    = 0;
     LiveFWt = 0;
     DMDemand.Clear();
     DMSupply.Clear();
     NDemand.Clear();
     NSupply.Clear();
     Detached.Clear();
 }
Пример #7
0
 /// <summary>Clears this instance.</summary>
 protected virtual void Clear()
 {
     Live = new Biomass();
     Dead = new Biomass();
     DMSupply.Clear();
     NSupply.Clear();
     DMDemand.Clear();
     NDemand.Clear();
     potentialDMAllocation.Clear();
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Пример #8
0
 /// <summary>Clears this instance.</summary>
 private void Clear()
 {
     Live = new Biomass();
     Dead = new Biomass();
     DMSupply.Clear();
     NSupply.Clear();
     DMDemand.Clear();
     NDemand.Clear();
     potentialDMAllocation.Clear();
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
     Height          = 0;
     LAI             = 0;
     LeafInitialised = false;
 }
Пример #9
0
 /// <summary>Clears this instance.</summary>
 protected void Clear()
 {
     Height = 0;
     StartNRetranslocationSupply = 0;
     StartNReallocationSupply    = 0;
     LiveFWt = 0;
     DMDemand.Clear();
     DMSupply.Clear();
     NDemand.Clear();
     NSupply.Clear();
     Detached.Clear();
     Leaves.Clear();
     if (Structure != null)
     {
         Structure.LeafTipsAppeared = 0;
     }
 }
Пример #10
0
 /// <summary>Clears this instance.</summary>
 protected virtual void Clear()
 {
     Live = new Biomass();
     Dead = new Biomass();
     dryMatterSupply.Clear();
     nitrogenSupply.Clear();
     dryMatterDemand.Clear();
     nitrogenDemand.Clear();
     potentialDMAllocation.Clear();
     potentialDMAllocating           = 0.0;
     potentialStructuralDMAllocation = 0.0;
     potentialMetabolicDMAllocation  = 0.0;
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Пример #11
0
 /// <summary>Clears this instance.</summary>
 protected void Clear()
 {
     Height = 0;
     StartNRetranslocationSupply     = 0;
     StartNReallocationSupply        = 0;
     PotentialDMAllocation           = 0;
     PotentialStructuralDMAllocation = 0;
     PotentialMetabolicDMAllocation  = 0;
     StructuralDMDemand = 0;
     StorageDMDemand    = 0;
     LiveFWt            = 0;
     dryMatterDemand.Clear();
     dryMatterSupply.Clear();
     nitrogenDemand.Clear();
     nitrogenSupply.Clear();
     Detached.Clear();
 }
Пример #12
0
 /// <summary>Clears this instance.</summary>
 protected virtual void Clear()
 {
     Live.Clear();
     Dead.Clear();
     DMRetranslocationSupply         = 0.0;
     DMReallocationSupply            = 0.0;
     NRetranslocationSupply          = 0.0;
     NReallocationSupply             = 0.0;
     PotentialDMAllocation           = 0.0;
     PotentialStructuralDMAllocation = 0.0;
     PotentialMetabolicDMAllocation  = 0.0;
     StructuralDMDemand = 0.0;
     StorageDMDemand    = 0.0;
     Allocated.Clear();
     Senesced.Clear();
     Detached.Clear();
     Removed.Clear();
 }
Пример #13
0
        protected void OnDoPotentialPlantGrowth(object sender, EventArgs e)
        {
            if (Plant.IsEmerged)
            {
                Detached.Clear();
                FRGR   = FRGRFunction.Value();
                Height = HeightFunction.Value();
                //Initialise biomass and nitrogen

                cohort.AddLeaf(InitialWtFunction.Value(), MinimumNConc.Value(), MaximumNConc.Value(), SpecificLeafAreaFunction.Value());

                double developmentRate = LeafDevelopmentRate.Value();
                cohort.IncreaseAge(developmentRate);

                StartLive = ReflectionUtilities.Clone(Live) as Biomass;
                StartNReallocationSupply    = NSupply.Reallocation;
                StartNRetranslocationSupply = NSupply.Retranslocation;
            }
        }
Пример #14
0
 /// <summary>Clears this instance.</summary>
 protected void Clear()
 {
     Height       = 0;
     PotentialEP  = 0;
     WaterDemand  = 0;
     LightProfile = null;
     StartNRetranslocationSupply = 0;
     StartNReallocationSupply    = 0;
     LiveFWt = 0;
     DMDemand.Clear();
     DMSupply.Clear();
     NDemand.Clear();
     NSupply.Clear();
     Detached.Clear();
     cohort.Clear();
     GrowthRespiration = 0;
     FRGR = 0;
     if (Structure != null)
     {
         Structure.LeafTipsAppeared = 0;
     }
 }