//---------------------------------------------------------------------

        /// <summary>
        /// Creates a cohort selection method for a specific set of ages and
        /// age ranges.
        /// </summary>
        /// <remarks>
        /// This overrides the base method so it can use the PartialThinning
        /// class to handle cohort selections with percentages.
        /// </remarks>
        protected override void CreateCohortSelectionMethodFor(ISpecies species,
                                                               IList <ushort> ages,
                                                               IList <AgeRange> ranges)
        {
            if (!PartialThinning.CreateCohortSelectorFor(species, ages, ranges))
            {
                // There were no percentages specified for this species' ages
                // and ranges.  So just create and store a whole cohort
                // selector using the base method.
                base.CreateCohortSelectionMethodFor(species, ages, ranges);
            }
        }
Ejemplo n.º 2
0
        //---------------------------------------------------------------------

        /// <summary>
        /// Creates a cohort selection method for a specific set of ages and
        /// age ranges.
        /// </summary>
        /// <remarks>
        /// This overrides the base method so it can use the PartialThinning
        /// class to handle cohort selections with percentages. Added support
        /// for InsectDefoliation via LandCover cohort selections
        /// </remarks>
        protected override void CreateCohortSelectionMethodFor(ISpecies species,
                                                               IList <ushort> ages,
                                                               IList <AgeRange> ranges)
        {
            if (LandCover.LandCover.DontParseTrees)
            {
                if (!PartialThinning.CreateCohortSelectorFor(species, ages, ranges))
                {
                    base.CreateCohortSelectionMethodFor(species, ages, ranges);
                }
            }
            else if (!LandCover.LandCover.CreateCohortSelectorFor(species, ages, ranges))
            {
                base.CreateCohortSelectionMethodFor(species, ages, ranges);
            }
        }