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

Compute some indicators

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