Esempio n. 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();
            PartialThinning.InitializeClass();
        }
Esempio n. 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 (PartialThinning.AdditionalCohortSelectors.Count == 0)
            {
                cohortCutter = new WholeCohortCutter(cohortSelector, extensionType);
            }
            else
            {
                cohortCutter = new PartialCohortCutter(cohortSelector,
                                                       PartialThinning.AdditionalCohortSelectors,
                                                       extensionType);
                PartialThinning.ClearCohortSelectors();
            }
            return(cohortCutter);
        }