Exemplo n.º 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);
            }
        }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 4
0
 ///<summary>Copy constructor</summary>
 ///<param name="universe">The universe of this ear peduncle.</param>
 ///<param name="toCopy">The ear peduncle to copy.</param>
 public EarPeduncle(Universe universe, EarPeduncle toCopy)
     : base(universe, toCopy)
 {
     InterNode_ = new InterNode(universe, toCopy.InterNode_);
 }
Exemplo n.º 5
0
 ///<summary>Initial constructor</summary>
 ///<param name="universe">The universe of this ear peduncle.</param>
 ///<param name="i">The index of this phytomer (= FinalLeafNumber + 1).</param>
 public EarPeduncle(Universe universe, int i, double cumulTTShoot, int roundedFinalNumber, double finalLeafNumber)
     : base(universe, i, cumulTTShoot)
 {
     InterNode_ = new InterNode(universe, roundedFinalNumber, isSmallPhytomer(finalLeafNumber, roundedFinalNumber), Index, PhytoNum);
 }
Exemplo n.º 6
0
 ///<summary>Copy constructor</summary>
 ///<param name="phytomer">The phytomer of this internode.</param>
 ///<param name="toCopy">The internode to copy</param>
 public InterNode(Universe universe, InterNode toCopy) : base(universe)
 {
     IsEarInterNode = toCopy.IsEarInterNode;
     Length         = toCopy.Length;
     LengthPot      = toCopy.LengthPot;
 }