public SwitchLAI(Universe universe, SwitchLAI toCopy, bool copyAll) : base(universe) { if (!SwitchMaize) { wheatLaistate_ = (toCopy.wheatLaistate_ != null) ? new SiriusQualityWheatLAI.WheatLAIState(toCopy.wheatLaistate_, copyAll) : null; wheatLaistate_.MaximumPotentialLaminaeAI = (toCopy.wheatLaistate_.MaximumPotentialLaminaeAI != null) ? new System.Collections.Generic.List <double>(toCopy.wheatLaistate_.MaximumPotentialLaminaeAI) : null; wheatLaistate_.MaximumPotentialSheathAI = (toCopy.wheatLaistate_.MaximumPotentialSheathAI != null) ? new System.Collections.Generic.List <double>(toCopy.wheatLaistate_.MaximumPotentialSheathAI) : null; wheatLaistate_.WaterLimitedPotDeltaAIList = (toCopy.wheatLaistate_.WaterLimitedPotDeltaAIList != null) ? new System.Collections.Generic.List <double>(toCopy.wheatLaistate_.WaterLimitedPotDeltaAIList) : null; wheatLaistate_.TT = (toCopy.wheatLaistate_.TT != null) ? new System.Collections.Generic.List <double>(toCopy.wheatLaistate_.TT) : null; wheatLaistate_.TTgroSheathList = (toCopy.wheatLaistate_.TTgroSheathList != null) ? new System.Collections.Generic.List <double>(toCopy.wheatLaistate_.TTgroSheathList) : null; wheatLaistate_.leafStateList = (toCopy.wheatLaistate_.leafStateList != null) ? new System.Collections.Generic.List <LeafState>(toCopy.wheatLaistate_.leafStateList) : null; wheatLaistate_.isPrematurelyDying = (toCopy.wheatLaistate_.isPrematurelyDying != null) ? new System.Collections.Generic.List <int>(toCopy.wheatLaistate_.isPrematurelyDying) : null; if (copyAll) { wheatLAI_ = (toCopy.wheatLAI_ != null) ? new SiriusQualityWheatLAI.Strategies.WheatLAI(toCopy.wheatLAI_) : null; } } else { maizeLaiState_ = (toCopy.maizeLaiState_ != null) ? new SiriusQualityMaizeLAI.MaizeLAIState(toCopy.maizeLaiState_, copyAll) : null; if (copyAll) { maizeLAI_ = (toCopy.maizeLAI_ != null) ? new SiriusQualityMaizeLAI.Strategies.MaizeLAI(toCopy.maizeLAI_) : null; } } }
public WheatLAIWrapper() { wheatLAI_ = new SiriusQualityWheatLAI.Strategies.WheatLAI(); wheatLaistate_ = new SiriusQualityWheatLAI.WheatLAIState(); wheatLeafstate_ = new SiriusQualityWheatLAI.WheatLeafState(); wheatLeafstate1_ = new SiriusQualityWheatLAI.WheatLeafState(); loadParametersWheat(); }
public SwitchLAI(Universe universe) : base(universe) { if (!SwitchMaize) { wheatLAI_ = new SiriusQualityWheatLAI.Strategies.WheatLAI(); wheatLaistate_ = new SiriusQualityWheatLAI.WheatLAIState(); loadParametersWheat(); } else { maizeLAI_ = new SiriusQualityMaizeLAI.Strategies.MaizeLAI(); maizeLaiState_ = new SiriusQualityMaizeLAI.MaizeLAIState(); loadParametersMaize(); } }