protected virtual void OnDoPotentialPlantGrowth(object sender, EventArgs e) { // save current state if (parentPlant.IsEmerged) { StartLive.SetTo(Live); } }
private void KillLeavesUniformly(double fraction) { foreach (PerrenialLeafCohort L in Leaves) { Biomass Loss = new Biomass(); Loss.SetTo(L.Live); Loss.Multiply(fraction); L.Dead.Add(Loss); L.Live.Subtract(Loss); L.AreaDead += L.Area * fraction; L.Area *= (1 - fraction); } }
/// <summary> /// Kill all leaves by a given fraction. /// </summary> /// <param name="fraction">The fraction to be removed from the leaves.</param> public void KillLeavesUniformly(double fraction) { Biomass loss = new Biomass(); LaiDead += Lai * fraction; foreach (PerennialLeafCohort leaf in leaves) { loss.SetTo(leaf.Live); loss.Multiply(fraction); dead.Add(loss); live.Subtract(loss); leaf.Dead.Add(loss); leaf.Live.Subtract(loss); leaf.AreaDead += leaf.Area * fraction; leaf.Area *= (1 - fraction); } Lai *= (1 - fraction); }
private void KillLeavesUniformly(double fraction) { foreach (PerrenialLeafCohort L in Leaves) { Biomass Loss = new Biomass(); Loss.SetTo(L.Live); Loss.Multiply(fraction); L.Dead.Add(Loss); L.Live.Subtract(Loss); } }