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

Suppress ddt on indicators to simplify code

parent eefc492e
......@@ -149,39 +149,33 @@ public :
/////////////////////////////REMI ADDS//////////////////////////////////
{
double ddt = 0.0;
if ( ( PhasePhenoPlante() != PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
// || ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
// || ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE )
){
ddt = 0.0;
D_MH = D_MH(-1);
} else {
ddt = 1;
D_MH = D_MH(-1) + 1;
}
D_MH = D_MH(-1) + ddt;
}
{
double ddt = 0.0;
if ( PhasePhenoPlante() == PHASEPHENOPLANTE_GERMINATION ){
// traduit condition TT_A2 = 0
ddt = 0.0;
D_SE = D_SE(-1);
} else {
ddt = 1;
D_SE = D_SE(-1) + 1;
}
D_SE = D_SE(-1) + ddt;
}
{
double ddt = 0.0;
if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
ddt = 0.0;
D_EF = D_EF(-1);
} else {
ddt = 1;
D_EF = D_EF(-1) + 1;
}
D_EF = D_EF(-1) + ddt;
}
SET_MH = 0.0;
......@@ -250,29 +244,33 @@ public :
}
{
double ddt = 0.0;
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 {
ddt = 1;
D_SE = D_SE(-1) + 1;
}
D_MH = D_MH(-1) + ddt;
}
{
double ddt = 0.0;
if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
ddt = 0.0;
D_EF = D_EF(-1);
} else {
ddt = 1;
std::cout << "Dans EF \n";
D_EF = D_EF(-1) + 1;
}
D_EF = D_EF(-1) + ddt;
}
{
......@@ -287,32 +285,26 @@ std::cout << "Dans EF \n";
}
{
double ddt = 0.0;
if ( ( PhasePhenoPlante() < PHASEPHENOPLANTE_MATURATION )
// traduit condition TT_A2 < date_TT_M0
|| ( PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE )
|| ( PhasePhenoPlante() >= PHASEPHENOPLANTE_RECOLTEE ) ){
// traduit condition TT_A2 = 0
ddt = 0.0;
SET_MH = SET_MH(-1);
} else {
ddt = ETRETM();
SET_MH = SET_MH(-1) + ETRETM();
}
SET_MH = SET_MH(-1) + ddt;
}
// calcul de MET_MH
MET_MH = SET_MH() / D_MH();
{
double ddt = 0.0;
if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
// traduit condition TT_A2 = 0
ddt = 0.0;
SET_EF = SET_EF(-1);
} else {
ddt = ETRETM();
SET_EF = SET_EF(-1) + ETRETM();
}
SET_EF = SET_EF(-1) + ddt;
}
// calcul de MET_EF
......@@ -321,42 +313,36 @@ std::cout << "Dans EF \n";
// calcul de NHT28_EF
{
double ddt = 0.0;
if ( Tmoy() < 28.0 ){
ddt = 0.0;
NHT28_EF = NHT28_EF(-1);
} else if ( (PhasePhenoPlante() < PHASEPHENOPLANTE_JUVENILE)
|| (PhasePhenoPlante() > PHASEPHENOPLANTE_CROISSANCEACTIVE) ){
ddt = 0.0;
NHT28_EF = NHT28_EF(-1);
} else {
ddt = 1.0;
NHT28_EF = NHT28_EF(-1) + 1;
}
NHT28_EF = NHT28_EF(-1) + ddt;
}
// calcul de NHT28
{
double ddt = 0.0;
if ( Tmoy() < 28.0 ){
ddt = 0.0;
NHT28 = NHT28(-1);
} else {
ddt = 1.0;
NHT28 = NHT28(-1) + 1;
//std::cout << "temp haute NHT28 \n";
}
NHT28 = NHT28(-1) + ddt;
}
// calcul de SGR_FM
{
double ddt = 0.0;
if ( PhasePhenoPlante() != PHASEPHENOPLANTE_FLORAISON){
ddt = 0.0;
SGR_FM = SGR_FM(-1);
} else {
ddt = RG();
SGR_FM = SGR_FM(-1) + RG();
}
SGR_FM = SGR_FM(-1) + ddt;
}
......
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