/// <summary> /// /// </summary> public override void Simulate() { try { if (CurrentCrop != null) { if (UseLAIModel()) { if (CurrentCrop.GetInFallow()) { TryAndPlantNewCrop(); } else if (CurrentCrop.IsGrowing()) { CurrentCrop.Simulate(); } } else { CurrentCrop.Simulate(); } ++DaysSinceHarvest; TotalTranspiration = CurrentCrop.TotalTranspiration; TotalEvapotranspiration = CurrentCrop.TotalTranspiration + Sim.SoilController.SoilEvap; UpdateCropWaterBalanceParameters(); } } catch (Exception e) { throw new Exception(e.Message); } }
/// <summary> /// /// </summary> public override void Simulate() { try { if (CurrentCrop != null) { if (UseLAIModel()) { if (CurrentCrop.GetInFallow()) { TryAndPlantNewCrop(); } else if (CurrentCrop.IsGrowing()) { CurrentCrop.Simulate(); } } else { CurrentCrop.Simulate(); } ++days_since_harvest; total_transpiration = CurrentCrop.total_transpiration; total_evapotranspiration = CurrentCrop.total_transpiration + sim.out_WatBal_SoilEvap_mm; UpdateCropWaterBalanceParameters(); } } catch (Exception e) { throw new Exception(e.Message); } }
/// <summary> /// /// </summary> /// <returns></returns> public bool InFallow() { if (CurrentCrop != null) { return(CurrentCrop.GetInFallow()); } return(true); }
internal bool InFallow() { try { if (CurrentCrop != null) { return(CurrentCrop.GetInFallow()); } } catch (Exception ex) { throw ErrorLogger.CreateException(ex); } return(true); }
public void TryModelVegetation() { try { if (VegetationModules != null) { if (CurrentCrop != null) { if (UseLAIModel()) { if (CurrentCrop.GetInFallow()) { foreach (var crop in SortedVegetationModules) { if (CanPlantCrop(crop)) { crop.Plant(); if (IrrigationModule != null) { IrrigationModule.FirstIrrigation = true; } return; } } } else if (CurrentCrop.IsGrowing()) { CurrentCrop.Simulate(); } } else { CurrentCrop.Simulate(); } ++DaysSinceHarvest; TotalTranspiration = CurrentCrop.TotalTranspiration; TotalEvapotranspiration = CurrentCrop.TotalTranspiration + SoilModule.SoilEvap; //UpdateCropWaterBalanceParameters(); } } } catch (Exception ex) { throw ErrorLogger.CreateException(ex); } }