Пример #1
0
        public int harvestCohorts(agelist cohorts, CohortRemovalMask mask)
        {
            int sumCut = 0;

            for (int age = BoundedPocketStandHarvester.pCoresites.TimeStep_Harvest; age <= 320; age += BoundedPocketStandHarvester.pCoresites.TimeStep_Harvest)
            {
                if (mask.query(age) == 1 && cohorts.query(age))
                {
                    cohorts.reset(age);
                    sumCut += age;
                }
            }
            return(sumCut);
        }
 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;
 }