/// <summary>Reset this plant to zero (kill crop)</summary> public void ResetZero() { // Zero out the DM pools dmLeaf1 = dmLeaf2 = dmLeaf3 = dmLeaf4 = 0.0; dmStem1 = dmStem2 = dmStem3 = dmStem4 = 0.0; dmStolon1 = dmStolon2 = dmStolon3 = 0.0; dmRoot = 0.0; dmDefoliated = 0.0; // Zero out the N pools Nleaf1 = Nleaf2 = Nleaf3 = Nleaf4 = 0.0; Nstem1 = Nstem2 = Nstem3 = Nstem4 = 0.0; Nstolon1 = Nstolon2 = Nstolon3 = 0.0; Nroot = 0.0; Ndefoliated = 0.0; digestDefoliated = 0.0; updateAggregated(); phenoStage = 0; prevState = new SpeciesState(); }
private void OnSimulationCommencing(object sender, EventArgs e) { // get the number of layers in the soil profile nLayers = Soil.Thickness.Length; // initialise soil water and N variables InitiliaseSoilArrays(); // set initial plant state SetInitialState(); // initialise the class which will hold yesterday's plant state prevState = new SpeciesState(); // check whether uptake is done here or by another module if (apsimArbitrator != null) { myWaterUptakeSource = "arbitrator"; myNitrogenUptakeSource = "arbitrator"; } // tell other modules about the existence of this species if (!isSwardControlled) DoNewCropEvent(); }
/// <summary>Reset this plant state to its initial values</summary> public void Reset() { SetInitialState(); prevState = new SpeciesState(); }