Commit 3c5fcf3e authored by Loic Manceau's avatar Loic Manceau
Browse files

Merge branch 'Development' into 'master'

Development

See merge request siriusquality/sqcode/siriusquality-bioma-wheatpotentiallai-component!2
parents a49b69e5 19bf9e94
File added
......@@ -20,7 +20,7 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
Console.WriteLine("*Choose the day after sowing when the simulation have to stop (between 0 and 68)");
string stopstr = Console.ReadLine();
stop = Int32.Parse(stopstr);
stop = Math.Min(68,stop);
stop = Math.Min(68, stop);
#endregion
......@@ -292,7 +292,7 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
#endregion
#region Intantiation of other ouptuts
#region Instantiation of other ouptuts
//Cumulative shoot thermal time
double cumulTTShoot = 0.0;
......@@ -305,7 +305,7 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
bool HasNewLeafAppeared = false;
int newLeafindex = 0;
int newLeafLastPhytoNum =0;
int newLeafLastPhytoNum = 0;
#endregion
......@@ -315,31 +315,22 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
//Biomass density of the leaf layer (per unit of area)
//Value from Yecora Rojo wheat variety
double specificWeight = 35.0;//g(DM)/m²(leaf)
//Phyllochronic duration of leaf lamina expansion
//Value from Yecora Rojo wheat variety
double PexpL = 1.1;
double specificWeight = 35.0;//g(DM)/m²(leaf)
//Daily available Nitrogen for stress factor calculation (gN/m²)
//It is a large amount to mimic Nitrogen unlimited cultivation
double availN = 2.5;
//Critical area-based nitrogen content for leaf expansion (g(N)/m²(leaf)
//Value from Yecora Rojo wheat variety
double SLNcri = 1.3;
#endregion
#region intermediate
List<LeafLayer> AllLeaves = new List<LeafLayer>();
double previousLeafNumber = 0.0;
#endregion
#endregion
#region Ouputs
......@@ -377,7 +368,6 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
#endregion
#region Create Leaf Layer
if (iday - 1 >= 0) previousLeafNumber = LeafNumber[iday - 1];
......@@ -450,104 +440,55 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
#region Grow/Kill leaves
int ileaf = 0;
foreach (LeafLayer leaflayer in AllLeaves)
{
#region Grow
if (leaflayer.State == LeafState.Growing)
{
#region Stress Growth factor
double actualDeltaAI = 0.0;
if (wheatlaiwrapper_.getIncDeltaAreaLimitSF() != 0)
{
actualDeltaAI = wheatlaiwrapper_.getIncDeltaAreaLimitSF() * Math.Min(1.0, availN / (wheatlaiwrapper_.getIncDeltaAreaLimitSF() * SLNcri));
}
double stressGrowth = 0.0;
if (wheatlaiwrapper_.getPotentialIncDeltaArea() != 0.0) stressGrowth = actualDeltaAI / wheatlaiwrapper_.getPotentialIncDeltaArea();
#region Calculate increase/deacrease in area index
wheatlaiwrapper_.UpdateAreas(cumulTTShoot, availN, AllLeaves);
#endregion
#endregion
#region Area Index increase
#region Shoot Area Index and Dry Matter dynamics
leaflayer.DeltaAI = wheatlaiwrapper_.getWaterLimitedPotDeltaAI(ileaf) * stressGrowth;
int ileaf = 0;
if ((cumulTTShoot - leaflayer.TTem) < leaflayer.LayerPhyllochron * PexpL)
{
leaflayer.laminaAI += leaflayer.DeltaAI;
}
else
{
leaflayer.sheathAI += leaflayer.DeltaAI;
}
foreach (LeafLayer leaflayer in AllLeaves)
{
#region Shoot Area Index increase/Decrease
ShootAI += leaflayer.DeltaAI;
ShootAI += leaflayer.DeltaAI;
#endregion
#endregion
#region bioMass Increase
#region bioMass Increase
if (leaflayer.State == LeafState.Growing)
{
leaflayer.DeltaDM = leaflayer.DeltaAI * specificWeight;
ShootDM += leaflayer.DeltaDM;
#endregion
}
#endregion
#region Kill
#region Biomass decrease
if (leaflayer.State == LeafState.Senescing)
{
if (leaflayer.GAI > 0.0)
{
#region Area Index decrease
//When leaves are senescing wheatlaiwrapper_.getWaterLimitedPotDeltaAI(ileaf) is negative
//We add a negative number to AI and DM, the leaves are actually dying
double deltalaminaAI = wheatlaiwrapper_.getWaterLimitedPotDeltaAI(ileaf) * (leaflayer.laminaAI / leaflayer.GAI);
double deltasheathAI = wheatlaiwrapper_.getWaterLimitedPotDeltaAI(ileaf) * (leaflayer.sheathAI / leaflayer.GAI);
leaflayer.sheathAI += deltalaminaAI;
leaflayer.laminaAI += deltasheathAI;
leaflayer.DeltaAI = deltalaminaAI + deltasheathAI;
ShootAI += leaflayer.DeltaAI;
#endregion
#region Biomass decrease
leaflayer.DeltaDM = leaflayer.DeltaAI * specificWeight;
ShootDM += leaflayer.DeltaDM;
#endregion
}
leaflayer.DeltaDM = leaflayer.DeltaAI * specificWeight;
ShootDM += leaflayer.DeltaDM;
}
#endregion
ileaf++;
}
#endregion
#endregion
#region Console Write
// Call an output of the component
// do phenology_.My output
// do wheatlaiwrapper_.My output
// e.g. wheatlaiwrapper_.getLeafStateList() List of the leaf layer states (Growing, Senecsing, dead...)
//...
......@@ -592,16 +533,13 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
+ S + space.Substring(0, len - S.Length));
}
#endregion
}
#region Console Write
Console.Write("type \"C\" to continue, something else to exit");
string brkcond = Console.ReadLine();
if (brkcond != "C") break;
if (brkcond != "C") break;
#endregion
}
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -7,8 +7,8 @@
<ProjectGuid>{F083391A-C1E7-4CC0-B68C-7F62D7B58326}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SiriusQuality_SiriusQuality_WheatLAIConsole</RootNamespace>
<AssemblyName>SiriusQuality-SiriusQuality-WheatLAIConsole</AssemblyName>
<RootNamespace>SiriusQuality_WheatLAIConsole</RootNamespace>
<AssemblyName>SiriusQuality-WheatLAIConsole</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
......
......@@ -43,6 +43,8 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
}
public double incDeltaArea { get { return wheatLaistate_.incDeltaArea; } }
private int previousIndex = -1;
......@@ -70,6 +72,8 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
double PlagSL=4.0;
double PsenLL=5.0;
double PsenSL=3.3;
double SLNcri = 1.3;
#endregion
......@@ -131,15 +135,36 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
wheatLAI_.Estimate(wheatLaistate_, wheatLeafstate_, wheatLeafstate1_, null);
//Fill the objects of the leafLayer Class with the content of leaf layers of the component
FillOutputLayersWheat(All);
FillOutputLayersWheat(All,true);
}
#endregion
#region Update Area Function
public void UpdateAreas(double cumulTTShoot, double availN, List<LeafLayer> All)
{
wheatLaistate_.cumulTTShoot = cumulTTShoot;
wheatLaistate_.availableN = availN;
wheatLaistate_.incDeltaAreaLimitSF = getIncDeltaAreaLimitSF();
wheatLaistate_.potentialIncDeltaArea = getPotentialIncDeltaArea();
for (int ilayer = 0; ilayer < All.Count; ilayer++) wheatLaistate_.WaterLimitedPotDeltaAIList[ilayer] = getWaterLimitedPotDeltaAI(ilayer);
FillIntputLayersWheat(All);
wheatLAI_.UpdateLeafArea(wheatLaistate_, wheatLeafstate_, wheatLeafstate1_, null);
FillOutputLayersWheat(All, false);
}
#endregion
#region Utilities
#region LoadParameters
#region LoadParameters
private void loadParametersWheat()
{
......@@ -161,10 +186,11 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
wheatLAI_.PlagSL = PlagSL;
wheatLAI_.PsenLL = PsenLL;
wheatLAI_.PsenSL = PsenSL;
wheatLAI_.SLNcri = SLNcri;
}
#endregion
#region Output state convertors
#region Output state convertors
private List<LeafState> GetStateListWheat()
{
......@@ -226,7 +252,7 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
#endregion
#region Connection with Leaf layer object
#region Connection with Leaf layer object
private void FillIntputLayersWheat(List<LeafLayer> All)
{
......@@ -266,37 +292,42 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
}
}
private void FillOutputLayersWheat(List<LeafLayer> All)
private void FillOutputLayersWheat(List<LeafLayer> All, bool isEstimate)
{
for (int ilayer = 0; ilayer < wheatLeafstate_.State.Count; ilayer++)
{
switch (wheatLeafstate_.State[ilayer])
if (isEstimate)
{
case 0:
All[ilayer].setState(LeafState.Growing);
break;
case 1:
All[ilayer].setState(LeafState.Mature);
break;
case 2:
All[ilayer].setState(LeafState.Senescing);
break;
case 3:
All[ilayer].setState(LeafState.Dead);
break;
switch (wheatLeafstate_.State[ilayer])
{
case 0:
All[ilayer].setState(LeafState.Growing);
break;
case 1:
All[ilayer].setState(LeafState.Mature);
break;
case 2:
All[ilayer].setState(LeafState.Senescing);
break;
case 3:
All[ilayer].setState(LeafState.Dead);
break;
}
All[ilayer].TTsen = wheatLeafstate_.TTsen[ilayer];
All[ilayer].TTmat = wheatLeafstate_.TTmat[ilayer];
All[ilayer].TTgroLamina = wheatLeafstate_.TTGroLamina[ilayer];
if (wheatLeafstate_.isSmallPhytomer[ilayer] == 1) All[ilayer].IsSmallPhytomer = true;
else All[ilayer].IsSmallPhytomer = false;
}
else
{
All[ilayer].MaxAI = wheatLeafstate1_.MaxAI[ilayer];
All[ilayer].DeltaAI = wheatLeafstate_.deltaAI[ilayer];
All[ilayer].laminaAI=wheatLeafstate_.LaminaAI[ilayer];
All[ilayer].sheathAI=wheatLeafstate_.SheathAI[ilayer];
}
All[ilayer].TTsen = wheatLeafstate_.TTsen[ilayer];
All[ilayer].TTmat = wheatLeafstate_.TTmat[ilayer];
All[ilayer].TTgroLamina = wheatLeafstate_.TTGroLamina[ilayer];
if (wheatLeafstate_.isSmallPhytomer[ilayer] == 1) All[ilayer].IsSmallPhytomer = true;
else All[ilayer].IsSmallPhytomer = false;
All[ilayer].setPrematurelyDying(wheatLeafstate1_.isPrematurelyDying[ilayer]);
}
......@@ -305,7 +336,7 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
#endregion
#region create a conmponent leaf layer
#region create a conmponent leaf layer
public void CreateLeafLayerLAIComponentWheat()
{
......@@ -324,10 +355,15 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
wheatLeafstate_.laminaSpecificN.Add(0.0);
wheatLeafstate_.LaminaAI.Add(0.0);
wheatLeafstate_.SheathAI.Add(0.0);
wheatLeafstate_.deltaAI.Add(0.0);
wheatLeafstate1_.State.Add(0);
wheatLeafstate1_.isPrematurelyDying.Add(0);
wheatLeafstate1_.MaxAI.Add(0.0);
wheatLeafstate1_.GAI.Add(0.0);
wheatLeafstate1_.LaminaAI.Add(0.0);
wheatLeafstate1_.SheathAI.Add(0.0);
}
......@@ -336,7 +372,7 @@ namespace SiriusQuality_SiriusQuality_WheatLAIConsole
#endregion
#region Intantiation
#region Instantiation
//Composite strategy instantiation
private SiriusQualityWheatLAI.Strategies.WheatLAI wheatLAI_;
......
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\obj\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.csprojResolveAssemblyReference.cache
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.exe.config
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.exe
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.pdb
......@@ -8,6 +9,6 @@ C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\CRA.ModelLayer.dll
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\SiriusQuality-WheatLAI.dll
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\SiriusQuality-WheatLAI.pdb
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\obj\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.csprojResolveAssemblyReference.cache
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\obj\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.exe
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\obj\Debug\SiriusQuality-SiriusQuality-WheatLAIConsole.pdb
C:\Users\mancealo\Documents\GitSiriusCode\SiriusQuality-BioMa-WheatPotentialLAI-Component\SiriusQuality-SiriusQuality-WheatLAIConsole\bin\Debug\SiriusQuality-WheatLAIConsole.exe.config
......@@ -5,7 +5,7 @@ VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriusQuality-WheatLAI", "SiriusQuality-WheatLAI\SiriusQuality-WheatLAI.csproj", "{59336D65-9DE8-4156-B7E0-E1713A5F3F39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriusQuality-SiriusQuality-WheatLAIConsole", "SiriusQuality-SiriusQuality-WheatLAIConsole\SiriusQuality-SiriusQuality-WheatLAIConsole.csproj", "{F083391A-C1E7-4CC0-B68C-7F62D7B58326}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SiriusQuality-WheatLAIConsole", "SiriusQuality-SiriusQuality-WheatLAIConsole\SiriusQuality-WheatLAIConsole.csproj", "{F083391A-C1E7-4CC0-B68C-7F62D7B58326}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestWheatLAI", "UnitTestWheatLAI\UnitTestWheatLAI.csproj", "{DFB3F76E-3364-4D6E-8BD7-9C40E26D89F2}"
EndProject
......
......@@ -86,6 +86,9 @@
<Compile Include="Strategies\SenescenceThermalTime.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Strategies\UpdateLeafArea.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Strategies\WaterLimitedLeafExpansion.cs">
<SubType>Code</SubType>
</Compile>
......
This diff is collapsed.
......@@ -83,8 +83,12 @@ namespace SiriusQualityWheatLAI.Strategies
_parameters0_0.Add(v17);
VarInfo v18 = new CompositeStrategyVarInfo(_senescencethermaltime,"PsenSL");
_parameters0_0.Add(v18);
VarInfo v19 = new CompositeStrategyVarInfo(_waterlimitedleafexpansion,"SLNmin");
VarInfo v19 = new CompositeStrategyVarInfo(_updateleafarea,"SLNcri");
_parameters0_0.Add(v19);
VarInfo v20 = new CompositeStrategyVarInfo(_updateleafarea,"PexpL");
_parameters0_0.Add(v20);
VarInfo v21 = new CompositeStrategyVarInfo(_waterlimitedleafexpansion,"SLNmin");
_parameters0_0.Add(v21);
mo0_0.Parameters=_parameters0_0;
//Inputs
List<PropertyDescription> _inputs0_0 = new List<PropertyDescription>();
......@@ -106,6 +110,7 @@ namespace SiriusQualityWheatLAI.Strategies
lAssStrat0_0.Add(typeof(SiriusQualityWheatLAI.Strategies.MaturityThermalTime).FullName);
lAssStrat0_0.Add(typeof(SiriusQualityWheatLAI.Strategies.MaximumPotentialFinalLAI).FullName);
lAssStrat0_0.Add(typeof(SiriusQualityWheatLAI.Strategies.SenescenceThermalTime).FullName);
lAssStrat0_0.Add(typeof(SiriusQualityWheatLAI.Strategies.UpdateLeafArea).FullName);
lAssStrat0_0.Add(typeof(SiriusQualityWheatLAI.Strategies.WaterLimitedLeafExpansion).FullName);
mo0_0.AssociatedStrategies = lAssStrat0_0;
//Adding the modeling options to the modeling options manager
......@@ -248,6 +253,7 @@ namespace SiriusQualityWheatLAI.Strategies
}
set {
_laminaexpansionthermaltime.PexpL=value;
_updateleafarea.PexpL=value;
}
}
public Double LowerFPAWexp
......@@ -385,6 +391,15 @@ namespace SiriusQualityWheatLAI.Strategies
_senescencethermaltime.PsenSL=value;
}
}
public Double SLNcri
{
get {
return _updateleafarea.SLNcri ;
}
set {
_updateleafarea.SLNcri=value;
}
}
public Double SLNmin
{
get {
......@@ -413,6 +428,7 @@ namespace SiriusQualityWheatLAI.Strategies
_maturitythermaltime.SetParametersDefaultValue();
_maximumpotentialfinallai.SetParametersDefaultValue();
_senescencethermaltime.SetParametersDefaultValue();
_updateleafarea.SetParametersDefaultValue();
_waterlimitedleafexpansion.SetParametersDefaultValue();
//GENERATED CODE END - PLACE YOUR CUSTOM CODE BELOW - Section5
......@@ -560,6 +576,13 @@ namespace SiriusQualityWheatLAI.Strategies
get { return SiriusQualityWheatLAI.Strategies.SenescenceThermalTime.PsenSLVarInfo; }
}
/// <summary>
///SLNcri VarInfo definition
/// </summary>
public static VarInfo SLNcriVarInfo
{
get { return SiriusQualityWheatLAI.Strategies.UpdateLeafArea.SLNcriVarInfo; }
}
/// <summary>
///SLNmin VarInfo definition
/// </summary>
public static VarInfo SLNminVarInfo
......@@ -595,6 +618,7 @@ namespace SiriusQualityWheatLAI.Strategies
ret += _maturitythermaltime.TestPostConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.MaturityThermalTime");
ret += _maximumpotentialfinallai.TestPostConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.MaximumPotentialFinalLAI");
ret += _senescencethermaltime.TestPostConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.SenescenceThermalTime");
ret += _updateleafarea.TestPostConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.UpdateLeafArea");
ret += _waterlimitedleafexpansion.TestPostConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.WaterLimitedLeafExpansion");
if (ret != "") { pre.TestsOut(ret, true, " postconditions tests of associated classes"); }
......@@ -649,6 +673,7 @@ namespace SiriusQualityWheatLAI.Strategies
ret += _maturitythermaltime.TestPreConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.MaturityThermalTime");
ret += _maximumpotentialfinallai.TestPreConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.MaximumPotentialFinalLAI");
ret += _senescencethermaltime.TestPreConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.SenescenceThermalTime");
ret += _updateleafarea.TestPreConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.UpdateLeafArea");
ret += _waterlimitedleafexpansion.TestPreConditions(wheatlaistate,wheatleafstate,wheatleafstate1, "strategy SiriusQualityWheatLAI.Strategies.WaterLimitedLeafExpansion");
if (ret != "") { pre.TestsOut(ret, true, " preconditions tests of associated classes"); }
......@@ -731,6 +756,7 @@ namespace SiriusQualityWheatLAI.Strategies
SiriusQualityWheatLAI.Strategies.MaturityThermalTime _maturitythermaltime = new SiriusQualityWheatLAI.Strategies.MaturityThermalTime();
SiriusQualityWheatLAI.Strategies.MaximumPotentialFinalLAI _maximumpotentialfinallai = new SiriusQualityWheatLAI.Strategies.MaximumPotentialFinalLAI();
SiriusQualityWheatLAI.Strategies.SenescenceThermalTime _senescencethermaltime = new SiriusQualityWheatLAI.Strategies.SenescenceThermalTime();
SiriusQualityWheatLAI.Strategies.UpdateLeafArea _updateleafarea = new SiriusQualityWheatLAI.Strategies.UpdateLeafArea();
SiriusQualityWheatLAI.Strategies.WaterLimitedLeafExpansion _waterlimitedleafexpansion = new SiriusQualityWheatLAI.Strategies.WaterLimitedLeafExpansion();
//Call of the associated strategies
......@@ -746,6 +772,8 @@ namespace SiriusQualityWheatLAI.Strategies
_leafexpansiondroughtfactor.Estimate(wheatlaistate, wheatleafstate, wheatleafstate1, actevents);
_maximumpotentialfinallai.Estimate(wheatlaistate, wheatleafstate, wheatleafstate1, actevents);
_waterlimitedleafexpansion.Estimate(wheatlaistate, wheatleafstate, wheatleafstate1, actevents);
resetDeltaAI(wheatleafstate);
}
#endregion
......@@ -757,6 +785,18 @@ namespace SiriusQualityWheatLAI.Strategies
//GENERATED CODE END - PLACE YOUR CUSTOM CODE BELOW - Section2
//Code written below will not be overwritten by a future code generation
public void UpdateLeafArea(SiriusQualityWheatLAI.WheatLAIState wheatlaistate, SiriusQualityWheatLAI.WheatLeafState wheatleafstate, SiriusQualityWheatLAI.WheatLeafState wheatleafstate1, CRA.AgroManagement.ActEvents actevents)
{
_updateleafarea.Estimate(wheatlaistate, wheatleafstate, wheatleafstate1, actevents);
}
public void resetDeltaAI(SiriusQualityWheatLAI.WheatLeafState wheatleafstate)
{
for (int ilayer = 0; ilayer < wheatleafstate.deltaAI.Count; ilayer++)
{
wheatleafstate.deltaAI[ilayer] = 0;
}
}
/// <summary>
/// copy constructor. We only need to copy the parameters (the strategies being stateless)
/// </summary>
......@@ -783,6 +823,8 @@ namespace SiriusQualityWheatLAI.Strategies
PsenLL = toCopy.PsenLL;
PsenSL = toCopy.PsenSL;
SLNcri = toCopy.SLNcri;
}
//End of custom code. Do not place your custom code below. It will be overwritten by a future code generation.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment