示例#1
0
        public SiteRemovalMask()
        {
            itsPlantingCode = new IntArray(BoundedPocketStandHarvester.numberOfSpecies);

            if (BoundedPocketStandHarvester.numberOfSpecies <= 0)
            {
                throw new Exception("Error: invalid number of speices");
            }
            mask = new CohortRemovalMask[BoundedPocketStandHarvester.numberOfSpecies];
            for (int i = 0; i < BoundedPocketStandHarvester.numberOfSpecies; i++)
            {
                mask[i] = new CohortRemovalMask();
            }
            numSpec = BoundedPocketStandHarvester.numberOfSpecies;
        }
示例#2
0
        public int harvestCohorts(Landis.Extension.Succession.Landispro.agelist cohorts, CohortRemovalMask mask)
        {
            int sumCut = 0;

            for (int age = BoundedPocketStandHarvester.pCoresites.TimeStepHarvest; age <= 320; age += BoundedPocketStandHarvester.pCoresites.TimeStepHarvest)
            {
                if (mask.query(age) == 1 && cohorts.query(age))
                {
                    cohorts.reset(age);
                    sumCut += age;
                }
            }
            return(sumCut);
        }