Exemplo n.º 1
0
        //GENERATED CODE END - PLACE YOUR CUSTOM CODE BELOW - Section2
        //Code written below will not be overwritten by a future code generation
        private double PotentialLaminaTillerAreaIndex(int tillerIndex, int roundedFinalNumber, double leafNumber, bool IsSmallPhytomer, int PhytoNum, int index, List <double> tilleringProfile)
        {
            double result;

            if (!IsSmallPhytomer)
            {
                var n = roundedFinalNumber;
                if (!IsFlagPhytomer(leafNumber, roundedFinalNumber, index))
                {
                    result = ((n - PhytoNum - 1 + CalculateShootNumber.ShiftTiller(tillerIndex)) * ((-1) / (NLL - 1)) + 1) * AreaPL;
                }
                else
                {
                    result = RatioFLPL * ((n - (n - 1) - 1 + CalculateShootNumber.ShiftTiller(tillerIndex)) * ((-1) / (NLL - 1)) + 1) * AreaPL;
                }
            }
            else
            {
                result = AreaSL;
            }

            result *= tilleringProfile[tillerIndex] / 10000;      // 10000 = cm^2 -> m^2
            return(result);
        }
Exemplo n.º 2
0
        private double PotentialSheathTillerAreaIndex(int tillerIndex, int roundedFinalLeafNumber, bool IsSmallPhytomer, int PhytoNum, List <double> tilleringProfile)
        {
            double result;

            if (!IsSmallPhytomer)
            {
                //pm 25 July 2016: modify the model to calculate the surface area of leaf sheath between two succesive collars (light exposed)
                //                 surface area).
                //  result = aSheath * Math.Pow(roundedFinalLeafNumber - PhytoNum - NLL + LeafLayer.ShiftTiller(tillerIndex), 2);
                result = Math.Max(AreaSS, AreaPL * ((roundedFinalLeafNumber - PhytoNum + CalculateShootNumber.ShiftTiller(tillerIndex)) * (-1 / (NLL - 2)) + 1));
            }
            else if (PhytoNum > 1)
            {
                result = 0;
            }
            else
            {
                result = AreaSS;
            }

            result *= tilleringProfile[tillerIndex] / 10000;       // 10000 = cm^2 -> m^2
            return(result);
        }