Ejemplo n.º 1
0
 private void OnCLEMEndOfTimeStep(object sender, EventArgs e)
 {
     // rotate harvest if needed
     if (HarvestData.Count() > 0 && Clock.Today.Year * 100 + Clock.Today.Month == HarvestData.First().Year * 100 + HarvestData.First().Month)
     {
         if (this.ActivityEnabled)
         {
             parentManagementActivity.RotateCrop();
         }
     }
 }
Ejemplo n.º 2
0
 private void OnCLEMEndOfTimeStep(object sender, EventArgs e)
 {
     // rotate harvest if needed
     if (HarvestData.Count() > 0 && Clock.Today.Year * 100 + Clock.Today.Month == HarvestData.First().Year * 100 + HarvestData.First().Month)
     {
         // don't rotate activities that may have just had their enabled status changed in this timestep
         if (this.ActivityEnabled & Status != ActivityStatus.Ignored)
         {
             parentManagementActivity.RotateCrop();
         }
     }
 }
Ejemplo n.º 3
0
 private void OnCLEMEndOfTimeStep(object sender, EventArgs e)
 {
     // rotate harvest if needed
     if ((this.ActivityEnabled & Status != ActivityStatus.Ignored) && HarvestData.Count() > 0 && clock.Today.Year * 100 + clock.Today.Month == HarvestData.First().Year * 100 + HarvestData.First().Month)
     {
         // don't rotate if no harvest tags or harvest type is not equal to "last"
         if (!HarvestTagsUsed || NextHarvest.HarvestType == "last")
         {
             parentManagementActivity.RotateCrop();
         }
     }
 }