A biomass disturbance that handles partial thinning of cohorts.
Inheritance: IDisturbance
コード例 #1
0
        //---------------------------------------------------------------------
        ///<summary>
        // Go through all active sites and damage them.  Mortality should occur the year FOLLOWING an active year.
        ///</summary>
        public static void Mortality(IInsect insect)
        {
            //PlugIn.ModelCore.UI.WriteLine("   {0} mortality.  StartYear={1}, StopYear={2}, CurrentYear={3}.", insect.Name, insect.OutbreakStartYear, insect.OutbreakStopYear, PlugIn.ModelCore.CurrentTime);

            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                PartialDisturbance.ReduceCohortBiomass(site);

                if (insect.BiomassRemoved[site] > 0)
                {
                    //PlugIn.ModelCore.UI.WriteLine("  Biomass removed at {0}/{1}: {2}.", site.Location.Row, site.Location.Column, SiteVars.BiomassRemoved[site]);
                    SiteVars.TimeOfLastEvent[site] = PlugIn.ModelCore.CurrentTime;
                }
            }
        }
コード例 #2
0
        //---------------------------------------------------------------------
        ///<summary>
        // Go through all active sites and damage them.  Mortality should occur the year FOLLOWING an active year.
        ///</summary>
        public static void Mortality(IInsect insect)
        {
            // PlugIn.ModelCore.UI.WriteLine("   {0} mortality.  StartYear={1}, StopYear={2}, CurrentYear={3}.", insect.Name, insect.OutbreakStartYear, insect.OutbreakStopYear, PlugIn.ModelCore.CurrentTime);

            foreach (ActiveSite site in PlugIn.ModelCore.Landscape)
            {
                //Try zeroing out biomass removed here @ start of each defoliation mortality year. Remove if doesn't work.
                if (SiteVars.BiomassRemoved[site] > 0)
                {
                    SiteVars.BiomassRemoved[site] = 0;
                }

                //PlugIn.ModelCore.UI.WriteLine("  Reducing cohort biomass for {0}...", insect.Name);
                PartialDisturbance.ReduceCohortBiomass(site);
                //PartialDisturbance.AddPartialMortalityToWoodyDebris(site);

                if (SiteVars.BiomassRemoved[site] > 0)
                {
                    // PlugIn.ModelCore.UI.WriteLine("  Biomass removed at {0}/{1}: {2}.", site.Location.Row, site.Location.Column, SiteVars.BiomassRemoved[site]);
                    SiteVars.TimeOfLastEvent[site] = PlugIn.ModelCore.CurrentTime;
                }
            }
        }
コード例 #3
0
        //---------------------------------------------------------------------

        static PartialDisturbance()
        {
            singleton = new PartialDisturbance();
        }
コード例 #4
0
        //---------------------------------------------------------------------

        static PartialDisturbance()
        {
            singleton = new PartialDisturbance();
        }