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); }
public void update(int iRol, int iCol) { if (updateFlag == 1) { Landis.Extension.Succession.Landispro.agelist a = new Landis.Extension.Succession.Landispro.agelist(); itsMaxAge = 0; //Change by YYF 2018/11 for (int i = 1; i < Landis.Extension.Succession.Landispro.species.NumSpec; i++) { a = (Landis.Extension.Succession.Landispro.agelist)BoundedPocketStandHarvester.pCoresites[(uint)iRol, (uint)iCol][i]; itsMaxAge = (int)Math.Max(itsMaxAge, a.oldest()); } updateFlag = 0; } }