//--------------------------------------------------------------------- /// <summary> /// Harvests the highest-ranked stand which hasn't been harvested yet /// during the current timestep. /// </summary> public virtual void HarvestHighestRankedStand() { //Model.Core.UI.WriteLine(" Standard Harvest Highest Ranked Stand."); //get the highest ranked unharvested stand Stand stand = rankings[highestUnharvestedStand].Stand; if (rankings[highestUnharvestedStand].Rank > 0) { if (!stand.IsSetAside) { // set the global current rank so it can be taken by // Prescription.Harvest and applied // to this harvest event currentRank = rankings[highestUnharvestedStand].Rank; prescription.Harvest(stand); this.HighestRankedStand = stand; double harvestedArea = stand.LastAreaHarvested; areaHarvested += harvestedArea; //if all (or more ??) is harvested, set areaRemainingToHarvest to 0 if (harvestedArea >= areaRemainingToHarvest) { areaRemainingToHarvest = 0; } else { areaRemainingToHarvest -= harvestedArea; } areaRemainingRatio = areaRemainingToHarvest / areaToHarvest; } } }