示例#1
0
        /// <summary>
        /// Initialize the library for use by client code.
        /// </summary>
        public static void InitializeLib(ICore modelCore)
        {
            Landis.Library.SiteHarvest.Main.InitializeLib(modelCore);

            Model.Core = modelCore;
            SiteVars.Initialize();
            DensityThinning.InitializeClass();
        }
示例#2
0
        /// <summary>
        /// Creates a cohort cutter instance.
        /// </summary>
        /// <returns>
        /// An instance of WholeCohortCutter if no species is partially thinned
        /// by the cohort selector.  If the selector has a percentage for at
        /// least one species, then an instance of PartialCohortCutter is
        /// returned.
        /// </returns>
        public static ICohortCutter CreateAdditionalCutter(ICohortSelector cohortSelector,
                                                           ExtensionType extensionType)
        {
            ICohortCutter cohortCutter;

            if (DensityThinning.AdditionalCohortSelectors.Count == 0)
            {
                cohortCutter = new WholeCohortCutter(cohortSelector, extensionType);
            }
            else
            {
                cohortCutter = new PartialCohortCutter(cohortSelector,
                                                       DensityThinning.AdditionalCohortSelectors,
                                                       extensionType);
                DensityThinning.ClearCohortSelectors();
            }
            return(cohortCutter);
        }