//---------------------------------------------------------------------
        public Prescription(string               name,
            IStandRankingMethod  rankingMethod,
            ISiteSelector        siteSelector,
            ICohortSelector      cohortSelector,
            Planting.SpeciesList speciesToPlant,
            int                  minTimeSinceDamage,
            bool                 preventEstablishment)
        {
            this.number = nextNumber;
            nextNumber++;

            this.name = name;
            this.rankingMethod = rankingMethod;
            this.siteSelector = siteSelector;
            this.cohortSelector = cohortSelector;
            this.speciesToPlant = speciesToPlant;
            this.minTimeSinceDamage = minTimeSinceDamage;
            this.preventEstablishment = preventEstablishment;
        }
        //---------------------------------------------------------------------

        public SingleRepeatHarvest(string               name,
                                   IStandRankingMethod  rankingMethod,
                                   ISiteSelector        siteSelector,
                                   ICohortSelector      cohortSelector,
                                   Planting.SpeciesList speciesToPlant,
                                   ICohortSelector      additionalCohortSelector,
                                   Planting.SpeciesList additionalSpeciesToPlant,
                                   ISiteSelector        additionalSiteSelector,
                                   int                  minTimeSinceDamage,
                                   bool                 preventEstablishment,
                                   int                  interval)
            : base(name, rankingMethod, siteSelector, cohortSelector, speciesToPlant,additionalSiteSelector, minTimeSinceDamage, preventEstablishment, interval)
        {
            this.initialCohortSelector = cohortSelector;
            this.initialSpeciesToPlant = speciesToPlant;

            this.additionalCohortSelector = additionalCohortSelector;
            this.additionalSpeciesToPlant = additionalSpeciesToPlant;
            this.additionalSiteSelector = additionalSiteSelector;
        }
        //---------------------------------------------------------------------

        public RemoveTrees(ICohortHarvest       cohortHarvest,
                           Planting.SpeciesList speciesToPlant)
        {
            this.cohortHarvest = cohortHarvest;
            this.speciesToPlant = speciesToPlant;
        }
Example #4
0
 //---------------------------------------------------------------------
 public RemoveTrees(ICohortCutter        cohortCutter,
     Planting.SpeciesList speciesToPlant)
 {
     this.cohortCutter = cohortCutter;
     this.speciesToPlant = speciesToPlant;
 }
        //---------------------------------------------------------------------

        /// <summary>
        /// Schedules a list of species to be planted at a site.
        /// </summary>
        public static void ScheduleForPlanting(Planting.SpeciesList speciesToPlant,
                                               ActiveSite site)
        {
            planting.Schedule(speciesToPlant, site);
        }
        //---------------------------------------------------------------------

        public Prescription(string               name,
                            IStandRankingMethod  rankingMethod,
                            ISiteSelector        siteSelector,
                            ICohortSelector      cohortSelector,
                            Planting.SpeciesList speciesToPlant,
                            int                  minTimeSinceDamage,
                            bool                 preventEstablishment)
        {
            this.number = nextNumber;
            nextNumber++;

            this.name = name;
            this.rankingMethod = rankingMethod;
            this.siteSelector = siteSelector;
            this.cohortSelector = cohortSelector;
            this.speciesToPlant = speciesToPlant;
            this.minTimeSinceDamage = minTimeSinceDamage;
            this.preventEstablishment = preventEstablishment;

            // scan the name for LU-->{LU-name}
            const string LUmarker = "LU-->";
            int positionOfLUmarker = name.IndexOf(LUmarker);
            int positionOfLUname = positionOfLUmarker + LUmarker.Length;
            string LUname = name.Substring(positionOfLUname);
            this.landUseAfterHarvest = LandUse.LookupName(LUname);
        }