Commit 4553a12a authored by RemiM's avatar RemiM Committed by Ronan Trepos
Browse files

Modify OC (TH) computation, without LLH

parent 94ab993b
......@@ -16,20 +16,20 @@
</out>&#xd;
</model>&#xd;
<model width="100" height="255" x="286" y="64" name="sunflo_bio" type="coupled">&#xd;
<in>&#xd;
<port name="ActionFerti"/>&#xd;
<port name="ActionIrrig"/>&#xd;
<port name="ActionRecolte"/>&#xd;
<port name="ActionSemis"/>&#xd;
<port name="DoseFerti"/>&#xd;
<port name="DoseIrrig"/>&#xd;
<port name="ETPP"/>&#xd;
<port name="Pluie"/>&#xd;
<port name="RG"/>&#xd;
<port name="Tmoy"/>&#xd;
<port name="densite"/>&#xd;
<port name="zSemis"/>&#xd;
<port name="Tx"/>&#xd;
<in>
<port name="ActionFerti"/>
<port name="ActionIrrig"/>
<port name="ActionRecolte"/>
<port name="ActionSemis"/>
<port name="DoseFerti"/>
<port name="DoseIrrig"/>
<port name="ETPP"/>
<port name="Pluie"/>
<port name="RG"/>
<port name="Tmoy"/>
<port name="densite"/>
<port name="zSemis"/>
<port name="Tx"/>
</in>&#xd;
<out>&#xd;
<port name="ChgtPhasePhenoPlante"/>&#xd;
......@@ -75,7 +75,7 @@
<port name="Eb"/>&#xd;
</out>&#xd;
</model>&#xd;
<model observables="diagnostic" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Variete,diagnostic,EXPERT_Plante,EXPERT_SimuInit" width="100" dynamics="diagnostic" height="75" x="562" y="14" name="diagnostic" type="atomic">&#xd;
<model observables="diagnostic" conditions="CONFIG_Plante,CONFIG_SimuInit,CONFIG_Variete,diagnostic,EXPERT_Plante,EXPERT_SimuInit" width="100" dynamics="diagnostic" height="75" x="1056" y="353" name="diagnostic" type="atomic">&#xd;
<in>
<port name="ChgtPhasePhenoPlante"/>
<port name="ETRETM"/>
......@@ -121,7 +121,7 @@
<port name="Teff"/>&#xd;
</out>&#xd;
</model>&#xd;
<model width="100" height="195" x="828" y="597" name="performances" type="coupled">&#xd;
<model width="100" height="195" x="889" y="624" name="performances" type="coupled">&#xd;
<in>
<port name="ChgtPhasePhenoPlante"/>
<port name="ETRETM"/>
......@@ -137,6 +137,13 @@
<port name="Eb"/>
<port name="FTSW"/>
<port name="Foo"/>
<port name="D_SE"/>
<port name="D_MH"/>
<port name="SGR_FM"/>
<port name="MET_EF"/>
<port name="MET_MH"/>
<port name="NHT28"/>
<port name="NHT28_EF"/>
</in>&#xd;
<out>
<port name="IRs"/>
......@@ -159,6 +166,13 @@
<port name="INN"/>&#xd;
<port name="FTSW"/>&#xd;
<port name="Eb"/>&#xd;
<port name="D_SE"/>
<port name="D_MH"/>
<port name="SGR_FM"/>
<port name="MET_EF"/>
<port name="MET_MH"/>
<port name="NHT28"/>
<port name="NHT28_EF"/>
</in>&#xd;
<out>&#xd;
<port name="TH"/>&#xd;
......@@ -258,6 +272,34 @@
<origin model="performances" port="Foo"/>
<destination model="elaboration_rendement" port="Foo"/>
</connection>
<connection type="input">
<origin model="performances" port="D_SE"/>
<destination model="elaboration_qualite" port="D_SE"/>
</connection>
<connection type="input">
<origin model="performances" port="D_MH"/>
<destination model="elaboration_qualite" port="D_MH"/>
</connection>
<connection type="input">
<origin model="performances" port="SGR_FM"/>
<destination model="elaboration_qualite" port="SGR_FM"/>
</connection>
<connection type="input">
<origin model="performances" port="MET_EF"/>
<destination model="elaboration_qualite" port="MET_EF"/>
</connection>
<connection type="input">
<origin model="performances" port="MET_MH"/>
<destination model="elaboration_qualite" port="MET_MH"/>
</connection>
<connection type="input">
<origin model="performances" port="NHT28"/>
<destination model="elaboration_qualite" port="NHT28"/>
</connection>
<connection type="input">
<origin model="performances" port="NHT28_EF"/>
<destination model="elaboration_qualite" port="NHT28_EF"/>
</connection>
</connections>&#xd;
</model>&#xd;
<model width="100" height="330" x="372" y="577" name="contraintes" type="coupled">&#xd;
......@@ -909,6 +951,34 @@
<origin model="sunflo_bio" port="RG"/>
<destination model="diagnostic" port="RG"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="D_SE"/>
<destination model="performances" port="D_SE"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="D_MH"/>
<destination model="performances" port="D_MH"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="SGR_FM"/>
<destination model="performances" port="SGR_FM"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="MET_EF"/>
<destination model="performances" port="MET_EF"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="MET_MH"/>
<destination model="performances" port="MET_MH"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="NHT28_EF"/>
<destination model="performances" port="NHT28_EF"/>
</connection>
<connection type="internal">
<origin model="diagnostic" port="NHT28"/>
<destination model="performances" port="NHT28"/>
</connection>
</connections>&#xd;
</model>&#xd;
<model width="100" height="120" x="19" y="43" name="climat" type="coupled">&#xd;
......
......@@ -119,52 +119,6 @@ public :
virtual void compute(const vle::devs::Time& /*time*/ )
{
if (first_compute) {
first_compute = false;
/////////////////////////////REMI ADDS//////////////////////////////////
/* {
if ( ( PhasePhenoPlante() != PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
// || ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
// || ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )
){
D_MH = D_MH(-1);
} else {
D_MH = D_MH(-1) + 1;
}
}
{
if ( PhasePhenoPlante() == PHASEPHENOPLANTE_GERMINATION ){
// traduit condition TT_A2 = 0
D_SE = D_SE(-1);
} else {
D_SE = D_SE(-1) + 1;
}
}
{
if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
D_EF = D_EF(-1);
} else {
D_EF = D_EF(-1) + 1;
}
}
SET_MH = 0.0;
MET_MH = 0.0;
SET_EF = 0.0;
MET_EF = 0.0;
NHT28 = 0.0;
NHT28_EF = 0.0;
SGR_FM = 0.0;
Foo = 5.0; */
////////////////////////////////////////////////////////////////////////
} else {
////////////////////////////////////////////////////////////////////////
/////////////////////////////REMI ADDS//////////////////////////////////
......@@ -189,9 +143,9 @@ public :
{
if ( PhasePhenoPlante() == PHASEPHENOPLANTE_GERMINATION ){
// traduit condition TT_A2 = 0
D_SE = D_SE(-1);
} else {
D_SE = D_SE(-1) + 1;
} else {
D_SE = D_SE(-1);
}
}
......@@ -280,7 +234,7 @@ public :
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
}
}
};
......
......@@ -39,10 +39,33 @@ public :
/*Sync*/ Var INN;
/*Sync*/ Var vNabs;
////////////////////////////////////////////////////////////////////////
/////////////////////////////REMI ADDS//////////////////////////////////
/// # Jours entre maturation et récolte.
Var D_MH;
/// # Jours entre semis et germination.
Var D_SE;
/// # Moyenne ETPET entre maturation et récolte.
Var MET_MH;
/// # Moyenne ETPET durant les jours de phase juvénile et croissance active.
Var MET_EF;
// Thermal stress entre germinatioan et initiation florale.
Var NHT28_EF;
// Thermal stress during whole season
Var NHT28;
// Sum of radiations during flowering
Var SGR_FM;
////////////////////////////////////////////////////////////////////////
/// Teneur en huile (0%), modèle linéaire [Casadebaig2008]
Var TH;
// duration of reproductive phase
Var D_MH;
// Var D_MH;
// sum of RUE on reproductive phase
Var SRUE_MH;
......@@ -82,7 +105,7 @@ public :
vNabs.init(this, "vNabs", events);
TH.init(this, "TH" , events);
D_MH.init(this, "D_MH" , events);
// D_MH.init(this, "D_MH" , events);
SRUE_MH.init(this, "SRUE_MH" , events);
SFTSW_FIM.init(this, "SFTSW_FIM" , events);
SFTSW_MH.init(this, "SFTSW_MH" , events);
......@@ -92,6 +115,17 @@ public :
LAD_MH.init(this, "LAD_MH" , events);
MRUE_MH.init(this, "MRUE_MH" , events);
photo_TH_aFinMATURATION.init(this, "photo_TH_aFinMATURATION" , events);
////////////////////////////////////////////////////////////////////////
/////////////////////////////REMI ADDS//////////////////////////////////
D_MH.init(this, "D_MH" , events);
D_SE.init(this, "D_SE", events);
MET_MH.init(this, "MET_MH" , events);
MET_EF.init(this, "MET_EF" , events);
NHT28_EF.init(this, "NHT28_EF", events);
NHT28.init(this, "NHT28", events);
SGR_FM.init(this, "SGR_FM", events);
////////////////////////////////////////////////////////////////////////
}
virtual ~ElaborationQualite() { }
......@@ -101,7 +135,7 @@ public :
if (first_compute) {
first_compute = false;
TH = 0.0;
D_MH = 0.0;
// D_MH = 0.0;
SRUE_MH = 0.0;
SFTSW_FIM = 0.0;
SFTSW_MH = 0.0;
......@@ -113,7 +147,7 @@ public :
photo_TH_aFinMATURATION = 0.0;
} else {
// calcul de D_MH
{
/*{
double ddt = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
......@@ -125,7 +159,7 @@ public :
ddt = 1;
}
D_MH = D_MH(-1) + ddt;
}
}*/
// calcul de SRUE_MH
{
......@@ -244,7 +278,7 @@ public :
}
{
double TH_tmp = 0.0;
/* double TH_tmp = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_FLORAISON )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE) ){
TH_tmp = 0.0;
......@@ -255,6 +289,17 @@ public :
+ 0.007 * LAD_MH() + 21.053 * MRUE_MH()
+ 0.832 * densite;
}
TH = TH_tmp; */
double TH_tmp = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_FLORAISON )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE) ){
TH_tmp = 0.0;
} else {
// Add LLH
TH_tmp = 9.43 - 0.130*D_SE() + 0.131*D_MH() -
0.00911*SGR_FM() + -12.8*MET_EF() + 2.54*MET_MH() -
0.209*NHT28() - 0.882*NHT28_EF() + 1.02*pv.thp;
}
TH = TH_tmp;
if ((PhasePhenoPlante(-1) == PHASEPHENOPLANTE_MATURATION) and
......
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