Commit 910ef76d authored by RemiM's avatar RemiM Committed by Ronan Trepos
Browse files

Compute some indicators

parent e7c778e4
...@@ -2,5 +2,12 @@ ...@@ -2,5 +2,12 @@
<!DOCTYPE vle_project_metadata> <!DOCTYPE vle_project_metadata>
<vle_project_metadata version="1.x" author="me"> <vle_project_metadata version="1.x" author="me">
<condPlugins/> <condPlugins/>
<outputGUIplugins/> <outputGUIplugins>
<outputGUIplugin view="timed" GUIplugin="gvle.output/storage"/>
<outputGUIplugin view="timed" GUIplugin="gvle.output/storage"/>
<outputGUIplugin view="timed" GUIplugin="gvle.output/storage"/>
<outputGUIplugin view="timed" GUIplugin="gvle.output/storage"/>
<outputGUIplugin view="timed" GUIplugin="gvle.output/storage"/>
<outputGUIplugin view="timed" GUIplugin="gvle.output/storage"/>
</outputGUIplugins>
</vle_project_metadata> </vle_project_metadata>
...@@ -39,7 +39,7 @@ public : ...@@ -39,7 +39,7 @@ public :
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/*Sync*/ Var PhasePhenoPlante; /*Sync*/ Var PhasePhenoPlante;
/*Sync*/ Var Tx;
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -60,10 +60,15 @@ public : ...@@ -60,10 +60,15 @@ public :
/////////////////////////////REMI ADDS////////////////////////////////// /////////////////////////////REMI ADDS//////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// # Variable test.
Var Foo;
/// # Jours entre maturation et récolte. /// # Jours entre maturation et récolte.
Var D_MH; Var D_MH;
/// # Jours entre semis et germination. /// # Jours entre semis et germination.
Var D_SE; Var D_SE;
/// # Jours de phase juvénile et croissance active.
Var D_EF;
/// # Somme ETPET entre maturation et récolte. /// # Somme ETPET entre maturation et récolte.
Var SET_MH; Var SET_MH;
...@@ -71,10 +76,10 @@ public : ...@@ -71,10 +76,10 @@ public :
/// # Moyenne ETPET entre maturation et récolte. /// # Moyenne ETPET entre maturation et récolte.
Var MET_MH; Var MET_MH;
/// # Somme ETPET entre germinatioan et initiation florale. /// # Somme ETPET durant les jours de phase juvénile et croissance active.
Var SET_EF; Var SET_EF;
/// # Moyenne ETPET entre germinatioan et initiation florale. /// # Moyenne ETPET durant les jours de phase juvénile et croissance active.
Var MET_EF; Var MET_EF;
// Thermal stress entre germinatioan et initiation florale. // Thermal stress entre germinatioan et initiation florale.
...@@ -82,11 +87,11 @@ public : ...@@ -82,11 +87,11 @@ public :
// Thermal stress during whole season // Thermal stress during whole season
Var NHT28; Var NHT28;
/*
// Radiations // Radiations
Var RG; Var RG;
// Sum of radiations during flowering // Sum of radiations during flowering
Var SGR_FM; Var SGR_FM;*/
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -106,22 +111,26 @@ public : ...@@ -106,22 +111,26 @@ public :
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/////////////////////////////REMI ADDS////////////////////////////////// /////////////////////////////REMI ADDS//////////////////////////////////
Foo.init(this, "Foo", events);
D_MH.init(this, "D_MH" , events); D_MH.init(this, "D_MH" , events);
D_SE.init(this, "D_SE", events); D_SE.init(this, "D_SE", events);
D_EF.init(this, "D_EF", events);
SET_MH.init(this, "SET_MH" , events); SET_MH.init(this, "SET_MH" , events);
MET_MH.init(this, "MET_MH" , events); MET_MH.init(this, "MET_MH" , events);
SET_EF.init(this, "SET_MH" , events); SET_EF.init(this, "SET_EF" , events);
MET_EF.init(this, "MET_MH" , events); MET_EF.init(this, "MET_EF" , events);
NHT28_EF.init(this, "NHT28_EF.init", events); NHT28_EF.init(this, "NHT28_EF.init", events);
NHT28.init(this, "NHT28.init", events);
/*
SGR_FM.init(this, "SGR_FM", events); SGR_FM.init(this, "SGR_FM", events);
RG.init(this, "RG", events); RG.init(this, "RG", events);*/
PhasePhenoPlante.init(this, "PhasePhenoPlante", events); PhasePhenoPlante.init(this, "PhasePhenoPlante", events);
Tx.init(this, "Tx", events);
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -139,15 +148,51 @@ public : ...@@ -139,15 +148,51 @@ public :
ISH3 = 0.0; //codeMMpourMemo Initial Value = 0.0 ISH3 = 0.0; //codeMMpourMemo Initial Value = 0.0
/////////////////////////////REMI ADDS////////////////////////////////// /////////////////////////////REMI ADDS//////////////////////////////////
D_MH = 0.0; {
D_SE = 0.0; double ddt = 0.0;
if ( ( PhasePhenoPlante() != PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
// || ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
// || ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )
){
ddt = 0.0;
} else {
ddt = 1;
}
D_MH = D_MH(-1) + ddt;
}
{
double ddt = 0.0;
if ( PhasePhenoPlante() == PHASEPHENOPLANTE_GERMINATION ){
// traduit condition TT_A2 = 0
ddt = 0.0;
} else {
ddt = 1;
}
D_SE = D_SE(-1) + ddt;
}
{
double ddt = 0.0;
if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
ddt = 0.0;
} else {
ddt = 1;
}
D_EF = D_EF(-1) + ddt;
}
SET_MH = 0.0; SET_MH = 0.0;
MET_MH = 0.0; MET_MH = 0.0;
SET_EF = 0.0; SET_EF = 0.0;
MET_EF = 0.0; MET_EF = 0.0;
NHT_28 = 0.0; NHT28 = 0.0;
NHT28_MH = 0.0; NHT28_EF = 0.0;
SGR_FM = 0.0; /* SGR_FM = 0.0;*/
Foo = 5.0;
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
} else { } else {
{ {
...@@ -200,14 +245,18 @@ public : ...@@ -200,14 +245,18 @@ public :
/////////////////////////////REMI ADDS////////////////////////////////// /////////////////////////////REMI ADDS//////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
{
Foo = 5.0;
}
{ {
double ddt = 0.0; double ddt = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION ) if ( ( PhasePhenoPlante() != PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0 // traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE ) // || ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )){ // || ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )
){
// traduit condition TT_A2 = 0 // traduit condition TT_A2 = 0
ddt = 0.0;
} else { } else {
ddt = 1; ddt = 1;
} }
...@@ -216,17 +265,19 @@ public : ...@@ -216,17 +265,19 @@ public :
{ {
double ddt = 0.0; double ddt = 0.0;
if ( PhasePhenoPlante() == PHASEPHENOPLANTE_JUVENILE){ if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
ddt = 0.0; ddt = 0.0;
} else { } else {
ddt = 1; ddt = 1;
std::cout << "Dans EF \n";
} }
D_EF = D_EF(-1) + ddt; D_EF = D_EF(-1) + ddt;
} }
{ {
double ddt = 0.0; double ddt = 0.0;
if ( PhasePhenoPlante() == PHASEPHENOPLANTE_GERMINATION ){ if ( PhasePhenoPlante() != PHASEPHENOPLANTE_GERMINATION ){
// traduit condition TT_A2 = 0 // traduit condition TT_A2 = 0
ddt = 0.0; ddt = 0.0;
} else { } else {
...@@ -254,7 +305,8 @@ public : ...@@ -254,7 +305,8 @@ public :
{ {
double ddt = 0.0; double ddt = 0.0;
if ( ( PhasePhenoPlante() == PHASEPHENOPLANTE_JUVENILE ) ){ if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
// traduit condition TT_A2 = 0 // traduit condition TT_A2 = 0
ddt = 0.0; ddt = 0.0;
} else { } else {
...@@ -270,9 +322,12 @@ public : ...@@ -270,9 +322,12 @@ public :
// calcul de NHT28_EF // calcul de NHT28_EF
{ {
double ddt = 0.0; double ddt = 0.0;
if ( Tx() < 28.0 ){ if ( Tx() < 0 ){
ddt = 0.0; ddt = 0.0;
} else if (( PhasePhenoPlante() != PHASEPHENOPLANTE_JUVENILE )){ std::cout << "Temperature faible \n";
} else if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
std::cout << "Pas dans EF \n";
ddt = 0.0; ddt = 0.0;
} else { } else {
ddt = 1.0; ddt = 1.0;
...@@ -284,9 +339,7 @@ public : ...@@ -284,9 +339,7 @@ public :
// calcul de NHT28 // calcul de NHT28
{ {
double ddt = 0.0; double ddt = 0.0;
if ( Tx() < 28.0 ){ if ( Tx() < 5.0 ){
ddt = 0.0;
} else if (( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE) || PhasePhenoPlante() == PHASEPHENOPLANTE_NONSEMEE){
ddt = 0.0; ddt = 0.0;
} else { } else {
ddt = 1.0; ddt = 1.0;
...@@ -294,7 +347,7 @@ public : ...@@ -294,7 +347,7 @@ public :
NHT28 = NHT28(-1) + ddt; NHT28 = NHT28(-1) + ddt;
} }
/*
// calcul de SGR_FM // calcul de SGR_FM
{ {
double ddt = 0.0; double ddt = 0.0;
...@@ -307,7 +360,7 @@ public : ...@@ -307,7 +360,7 @@ public :
SGR_FM = SGR_FM(-1) + ddt; SGR_FM = SGR_FM(-1) + ddt;
} }
*/
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -36,6 +36,8 @@ public : ...@@ -36,6 +36,8 @@ public :
/*Sync*/ Var ETRETM; /*Sync*/ Var ETRETM;
/*Sync*/ Var TRPF; /*Sync*/ Var TRPF;
/*Sync*/ Var INN; /*Sync*/ Var INN;
/*Sync*/ Var Foo;
/// # Rendement (0% humidité, 0% impuretés) /// # Rendement (0% humidité, 0% impuretés)
Var RDT; Var RDT;
/// # Jours de stress végétatifs (E1 - F1) (covariables statistiques) /// # Jours de stress végétatifs (E1 - F1) (covariables statistiques)
...@@ -55,11 +57,18 @@ public : ...@@ -55,11 +57,18 @@ public :
/// Capture de RDT a un instant donne /// Capture de RDT a un instant donne
Var photo_RDT_aFinMATURATION; Var photo_RDT_aFinMATURATION;
/////////////////////////////REMI ADDS//////////////////////////////////
Var Foo2;
////////////////////////////////////////////////////////////////////////
ElaborationRendement(const vle::devs::DynamicsInit& model, ElaborationRendement(const vle::devs::DynamicsInit& model,
const vle::devs::InitEventList& events) : const vle::devs::InitEventList& events) :
DiscreteTimeDyn(model, events) DiscreteTimeDyn(model, events)
{ {
/////////////////////////////REMI ADDS//////////////////////////////////
Foo.init(this, "Foo", events);
Foo2.init(this, "Foo2", events);
////////////////////////////////////////////////////////////////////////
pr.initialiser( events ); pr.initialiser( events );
pv.initialiser( events ); pv.initialiser( events );
...@@ -102,6 +111,9 @@ public : ...@@ -102,6 +111,9 @@ public :
photo_INN_CROISSANCEACTIVE_A_FLORAISON = 0.0; //codeMMpourMemo INNF1 = 0 photo_INN_CROISSANCEACTIVE_A_FLORAISON = 0.0; //codeMMpourMemo INNF1 = 0
IRs = 0.0; IRs = 0.0;
photo_IRs_aFinMATURATION = 0.0; photo_IRs_aFinMATURATION = 0.0;
/////////////////////////////REMI ADDS//////////////////////////////////
Foo2 = 0;
////////////////////////////////////////////////////////////////////////
{ {
double RDT_tmp = 0.0; double RDT_tmp = 0.0;
if ( ( PhasePhenoPlante() >= PHASEPHENOPLANTE_DESSICATION ) if ( ( PhasePhenoPlante() >= PHASEPHENOPLANTE_DESSICATION )
...@@ -115,7 +127,11 @@ public : ...@@ -115,7 +127,11 @@ public :
} }
photo_RDT_aFinMATURATION = 0.0; photo_RDT_aFinMATURATION = 0.0;
} else { } else {
/////////////////////////////REMI ADDS//////////////////////////////////
{
Foo2 = 3*Foo();
}
////////////////////////////////////////////////////////////////////////
{ {
double ddt = 0.0; double ddt = 0.0;
......
Supports Markdown
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