public override void Harvest() { List <int> rankedList = new List <int>(); Stand stand = new Stand(); int standCut; itsRankAlgorithm.rankStands(ref rankedList); getReport().reset(); // length of rankedList should be equal to length of theLength; foreach (int it in rankedList) { if (isHarvestDone() == 0) { stand.Copy(BoundedPocketStandHarvester.pstands[it]); if (stand.canBeHarvested() && (BoundedPocketStandHarvester.iParamstandAdjacencyFlag == 0 || !stand.neighborsWereRecentlyHarvested())) { standCut = harvestStand(BoundedPocketStandHarvester.pstands[it]); } } else { break; } } writeReport(BoundedPocketStandHarvester.harvestOutputFile2); }
public void filter(ref IntArray theStandArray, ref IntArray theAgeArray, ref int theLength) { Stand stand = new Stand(); int theNewLength = 0; List <int> it = new List <int>(); it = itsManagementArea.itsStandList; for (int i = 0; i < it.Count; i++) { int id = it[i]; stand.Copy(BoundedPocketStandHarvester.pstands[id]); if (stand.canBeHarvested() && stand.getAge() >= itsRotationAge) { theNewLength++; theStandArray[theNewLength] = id; theAgeArray[theNewLength] = stand.getAge(); } } theLength = theNewLength; }