Example #1
0
        /// <summary>Initial constructor</summary>
        /// <param name="universe">The universe of this LeafLayer.</param>
        /// <param name="i">The index of this leaf Layer (0 based index, starts from the bottom of the plant).</param>
        public LeafLayer(Universe universe, int i, double cumulTTShoot, int roundedFinalNumber, double finalLeafNumber, double phyllochron, double deltaTTShoot, double deltaTTPhenoMaize, double cumulTTPhenoMaizeAtEmergence)
            : base(universe, i, cumulTTShoot)
        {
            LayerPhyllochron = phyllochron;

            IsSmallPhytomer = isSmallPhytomer(finalLeafNumber, roundedFinalNumber);

            if (!IsSmallPhytomer)
            {
                TTmat = PlagLL * LayerPhyllochron;
                TTsen = PsenLL * LayerPhyllochron;
            }
            else
            {
                TTmat = PlagSL * LayerPhyllochron;
                TTsen = PsenSL * LayerPhyllochron;
            }


            DeltaAI            = 0;
            DeltaDM            = 0;
            IsPrematurelyDying = false;
            MaxAI         = 0;
            State         = LeafState.Growing;
            exposedSheath = new ExposedSheath(universe);
            leafLamina    = new LeafLaminae(universe);
            interNode     = new InterNode(universe, roundedFinalNumber, IsSmallPhytomer, Index, PhytoNum);

            if (SwitchMaize)
            {
                maizeLeaf = new MaizeLeaf(universe, i, cumulTTPhenoMaizeAtEmergence, finalLeafNumber, deltaTTPhenoMaize);
            }
        }
Example #2
0
 public override void Dispose()
 {
     base.Dispose();
     if (interNode != null)
     {
         interNode.Dispose();
         interNode = null;
     }
     if (leafLamina != null)
     {
         leafLamina.Dispose();
         leafLamina = null;
     }
     if (exposedSheath != null)
     {
         exposedSheath.Dispose();
         exposedSheath = null;
     }
 }
Example #3
0
 ///<summary>Copy constructor</summary>
 ///<param name="universe">The universe of this leaf Layer.</param>
 ///<param name="toCopy">The leaf Layer to copy</param>
 public LeafLayer(Universe universe, LeafLayer toCopy)
     : base(universe, toCopy)
 {
     LayerPhyllochron   = toCopy.LayerPhyllochron;
     TTmat              = toCopy.TTmat;
     TTsen              = toCopy.TTsen;
     DeltaAI            = toCopy.DeltaAI;
     IsPrematurelyDying = toCopy.IsPrematurelyDying;
     MaxAI              = toCopy.MaxAI;
     State              = toCopy.State;
     IsSmallPhytomer    = toCopy.IsSmallPhytomer;
     exposedSheath      = (toCopy.exposedSheath != null) ? new ExposedSheath(universe, toCopy.exposedSheath) : null;
     leafLamina         = (toCopy.leafLamina != null) ? new LeafLaminae(universe, toCopy.leafLamina) : null;
     interNode          = (toCopy.interNode != null) ? new InterNode(universe, toCopy.interNode) : null;
     if (SwitchMaize)
     {
         maizeLeaf = (toCopy.maizeLeaf != null) ? new MaizeLeaf(universe, toCopy.maizeLeaf) : null;
     }
 }
Example #4
0
 ///Constructor.
 public ExposedSheath(Universe universe, ExposedSheath toCopy)
     : base(universe, toCopy)
 {
     TTSinceSen = toCopy.TTSinceSen;
 }