//---------------------------------------------------------------------
 public static void CohortDied(object sender,
     DeathEventArgs eventArgs)
 {
     ICohort cohort = eventArgs.Cohort;
     if (isDebugEnabled)
         log.DebugFormat("    cohort died: {0}, age {1}, biomass {2}",
                         cohort.Species.Name,
                         cohort.Age,
                         cohort.Biomass);
     RecordHarvest(cohort.Species, cohort.Biomass);
 }
예제 #2
0
        public static void CohortDied(object         sender,
            DeathEventArgs eventArgs)
        {
            ExtensionType disturbanceType = eventArgs.DisturbanceType;
            PoolPercentages cohortReductions = Module.Parameters.CohortReductions[disturbanceType];

            ICohort cohort = (Landis.Library.BiomassCohorts.ICohort) eventArgs.Cohort;
            ActiveSite site = eventArgs.Site;
            int nonWoody = cohort.ComputeNonWoodyBiomass(site);
            int woody = (cohort.Biomass - nonWoody);

            int nonWoodyInput = ReduceInput(nonWoody, cohortReductions.Foliar);
            int woodyInput = ReduceInput(woody, cohortReductions.Wood);

            //ForestFloor.AddBiomass(woodyInput, nonWoodyInput, cohort.Species, site);
            ForestFloor.AddWoody(woodyInput, cohort.Species, site);
            ForestFloor.AddLitter(nonWoodyInput, cohort.Species, site);
        }
예제 #3
0
        //---------------------------------------------------------------------

        // Event handler when a cohort is killed by an age-only disturbance.
        public void CohortKilledByAgeOnlyDisturbance(object                 sender,
                                                     DeathEventArgs eventArgs)
        {
            // If this plug-in is not running, then some base disturbance
            // plug-in killed the cohort.
            if (! running)
                return;

            SiteVars.BiomassRemoved[eventArgs.Site] += eventArgs.Cohort.Biomass;
        }
예제 #4
0
        //---------------------------------------------------------------------

        // Event handler when a cohort is killed by an age-only disturbance.
        public static void CohortKilledByAgeOnlyDisturbance(object sender,
                                                            DeathEventArgs eventArgs)
        {

        //    // If this plug-in is not running, then some base disturbance
        //    // plug-in killed the cohort.
            if (!running)
                return;

        //    // If this plug-in is running, then the age-only disturbance must
        //    // be a cohort-selector from Base Harvest.

            int reduction = eventArgs.Cohort.Biomass;  // Is this double-counting??
            SiteVars.BiomassRemoved[eventArgs.Site] += reduction;

            //ModelCore.UI.WriteLine("Cohort Biomass removed={0:0.0}; Total Killed={1:0.0}.", reduction, SiteVars.BiomassRemoved[eventArgs.Site]);
        //    //SiteVars.CohortsPartiallyDamaged[eventArgs.Site]++;
        }
예제 #5
0
 //---------------------------------------------------------------------
 public void CohortDied(object sender,
     DeathEventArgs eventArgs)
 {
     ExtensionType disturbanceType = eventArgs.DisturbanceType;
     if (disturbanceType != null)
     {
         ActiveSite site = eventArgs.Site;
         Disturbed[site] = true;
         if (disturbanceType.IsMemberOf("disturbance:fire"))
             Reproduction.CheckForPostFireRegen(eventArgs.Cohort, site);
         else
             Reproduction.CheckForResprouting(eventArgs.Cohort, site);
     }
 }
 public static void CohortDied(object sender, DeathEventArgs eventArgs)
 {
     ExtensionType disturbanceType = eventArgs.DisturbanceType;
 }
예제 #7
0
        //---------------------------------------------------------------------

        public static void CohortDied(object sender,
                                      DeathEventArgs eventArgs)
        {
            ICohort cohort = eventArgs.Cohort;
            RecordHarvest(cohort.Species, cohort.Biomass);
        }
 public static void CohortDied(object         sender,
                               DeathEventArgs eventArgs)
 {
     ThrowException();
 }
예제 #9
0
        //---------------------------------------------------------------------

        // Event handler when a cohort is killed by an age-only disturbance.
        public void CohortKilledByAgeOnlyDisturbance(object                 sender,
                                                     DeathEventArgs eventArgs)
        {
            // If this plug-in is not running, then some base disturbance
            // plug-in killed the cohort.
            if (! running)
                return;
         
        }
        //---------------------------------------------------------------------
        // Event handler when a cohort is killed by an age-only disturbance.
        public static void CohortKilledByAgeOnlyDisturbance(object sender,
            DeathEventArgs eventArgs)
        {
            //    // If this plug-in is not running, then some base disturbance
            //    // plug-in killed the cohort.
            if (!running)
                return;

            //    // If this plug-in is running, then the age-only disturbance must
            //    // be a cohort-selector from Base Harvest.

            /* 2015-07-30 LCB
             * Yes, this is double-counting. The Biomass is recorded when the SiteHarvested event fires
             * Disconnecting event in the LoadParameters() method of this class
             */

            int reduction = eventArgs.Cohort.Biomass;  // Is this double-counting??
            SiteVars.BiomassRemoved[eventArgs.Site] += reduction;

            //ModelCore.UI.WriteLine("Cohort Biomass removed={0:0.0}; Total Killed={1:0.0}.", reduction, SiteVars.BiomassRemoved[eventArgs.Site]);
            //    //SiteVars.CohortsPartiallyDamaged[eventArgs.Site]++;
        }