Exemple #1
0
        private double calcLeafAppearance(Culm culm)
        {
            var leavesRemaining    = culms.FinalLeafNo - culm.CurrentLeafNo;
            var leafAppearanceRate = culms.getLeafAppearanceRate(leavesRemaining);
            // if leaves are still growing, the cumulative number of phyllochrons or fully expanded leaves is calculated from thermal time for the day.
            var dltLeafNo = MathUtilities.Bound(MathUtilities.Divide(phenology.thermalTime.Value(), leafAppearanceRate, 0), 0.0, leavesRemaining);

            culm.AddNewLeaf(dltLeafNo);

            return(dltLeafNo);
        }
Exemple #2
0
        /// <summary>
        /// Add a tiller.
        /// </summary>
        /// <param name="leafAtAppearance"></param>
        /// <param name="Leaves"></param>
        /// <param name="fractionToAdd"></param>
        private void AddTiller(double leafAtAppearance, double Leaves, double fractionToAdd)
        {
            double fraction = 1;

            if (FertileTillerNumber - tillersAdded < 1)
            {
                fraction = FertileTillerNumber - tillersAdded;
            }

            // get number of tillers
            // add fractionToAdd
            // if new tiller is neded add one
            // fraction goes to proportions
            double tillerFraction = culms.Culms.Last().Proportion;

            //tillerFraction +=fractionToAdd;
            fraction = tillerFraction + fractionToAdd - Math.Floor(tillerFraction);
            //a new tiller is created with each new leaf, up the number of fertileTillers
            if (tillerFraction + fractionToAdd > 1)
            {
                Culm newCulm = new Culm(leafAtAppearance);

                //bell curve distribution is adjusted horizontally by moving the curve to the left.
                //This will cause the first leaf to have the same value as the nth leaf on the main culm.
                //T3&T4 were defined during dicussion at initial tillering meeting 27/06/12
                //all others are an assumption
                //T2 = 3 Leaves
                //T3 = 4 Leaves
                //T4 = 5 leaves
                //T5 = 6 leaves
                //T6 = 7 leaves
                newCulm.CulmNo        = culms.Culms.Count;
                newCulm.CurrentLeafNo = 0;                //currentLeaf);
                newCulm.VertAdjValue  = culms.MaxVerticalTillerAdjustment.Value() + (tillersAdded * culms.VerticalTillerAdjustment.Value());
                newCulm.Proportion    = fraction;
                newCulm.FinalLeafNo   = culms.Culms[0].FinalLeafNo;
                //newCulm.calcLeafAppearance();
                newCulm.UpdatePotentialLeafSizes(areaCalc as ICulmLeafArea);
                calcLeafAppearance(newCulm);
                //newCulm.calculateLeafSizes();
                culms.Culms.Add(newCulm);
            }
            else
            {
                culms.Culms.Last().Proportion = fraction;
            }
            tillersAdded += fractionToAdd;
        }
Exemple #3
0
        /// <summary>
        /// Add a tiller.
        /// </summary>
        /// <param name="leafAtAppearance"></param>
        /// <param name="Leaves"></param>
        /// <param name="fractionToAdd"></param>
        private void AddTiller(double leafAtAppearance, double Leaves, double fractionToAdd)
        {
            double fraction = 1;

            if (calculatedTillers - tillersAdded < 1)
            {
                fraction = calculatedTillers - tillersAdded;
            }

            // get number if tillers
            // add fractionToAdd
            // if new tiller is neded add one
            // fraction goes to proportions
            double tillerFraction = Culms.Last().getProportion();

            //tillerFraction +=fractionToAdd;
            fraction = tillerFraction + fractionToAdd - Math.Floor(tillerFraction);
            //a new tiller is created with each new leaf, up the number of fertileTillers
            if (tillerFraction + fractionToAdd > 1)
            {
                Culm newCulm = new Culm(leafAtAppearance, culmParams);

                //bell curve distribution is adjusted horizontally by moving the curve to the left.
                //This will cause the first leaf to have the same value as the nth leaf on the main culm.
                //T3&T4 were defined during dicussion at initial tillering meeting 27/06/12
                //all others are an assumption
                //T2 = 3 Leaves
                //T3 = 4 Leaves
                //T4 = 5 leaves
                //T5 = 6 leaves
                //T6 = 7 leaves
                newCulm.setCulmNo(Culms.Count);
                newCulm.setCurrentLeafNo(0);                //currentLeaf);
                verticalAdjustment = aMaxVert.Value() + (tillersAdded * aTillerVert.Value());
                newCulm.setVertLeafAdj(verticalAdjustment);
                newCulm.setProportion(fraction);
                newCulm.calcFinalLeafNo();
                newCulm.calcLeafAppearance();
                newCulm.calculateLeafSizes();
                Culms.Add(newCulm);
            }
            else
            {
                Culms.Last().setProportion(fraction);
            }
            tillersAdded += fractionToAdd;
        }
Exemple #4
0
        /// <summary>
        /// Add a tiller.
        /// </summary>
        void InitiateTiller(int tillerNumber, double fractionToAdd, double initialLeaf)
        {
            double leafNoAtAppearance = 1.0;                                        // DEBUG  parameter?
            double nTillersPresent    = culms.Culms.Count - 1;

            Culm newCulm = new Culm(leafNoAtAppearance);

            newCulm.CulmNo        = tillerNumber;
            newCulm.CurrentLeafNo = initialLeaf;
            newCulm.VertAdjValue  = culms.MaxVerticalTillerAdjustment.Value() + (tillersAdded * culms.VerticalTillerAdjustment.Value());
            newCulm.Proportion    = fractionToAdd;
            newCulm.FinalLeafNo   = culms.Culms[0].FinalLeafNo;
            //newCulm.calcLeafAppearance();
            newCulm.UpdatePotentialLeafSizes(areaCalc as ICulmLeafArea);
            //newCulm.calculateLeafSizes();
            culms.Culms.Add(newCulm);
        }