Commit 07240034 authored by Ronan Trépos's avatar Ronan Trépos
Browse files

sunflo: remove photo_Date* variables

parent 3f8fa63b
......@@ -45,14 +45,6 @@ public :
//var internes
Var TT_A0;
Var AP;
Var photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION;
Var photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE;
Var photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE;
Var photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON;
Var photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION;
Var photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE;
Var photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION;
Var photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE;
Var TT_A2;
Var PhasePhenoPlante;
Var TT_F1;
......@@ -83,22 +75,6 @@ public :
TT_A0.init(this, "TT_A0", events);
AP.init(this, "AP", events);
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION.init(this,
"photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION", events);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE.init(this,
"photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE", events);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE.init(this,
"photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE", events);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON.init(this,
"photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON", events);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION.init(this,
"photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION", events);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE.init(this,
"photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE", events);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION.init(this,
"photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION", events);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE.init(this,
"photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE", events);
double FHTR_valeurInitiale = 1.0;
......@@ -110,14 +86,7 @@ public :
PhasePhenoPlante.init_value((double)PHASEPHENOPLANTE_NONSEMEE);
AP.init_value(pp.AP_a * Teff() * ( 1 - FHTR_valeurInitiale ));
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION.init_value(0.0);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE.init_value(0.0);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE.init_value(0.0);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON.init_value(0.0);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION.init_value(0.0);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE.init_value(0.0);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION.init_value(0.0);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE.init_value(0.0);
}
virtual ~Phenologie() { }
......@@ -195,18 +164,10 @@ public :
case PHASEPHENOPLANTE_NONSEMEE :
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
if ((int)ActionSemis() == ACTIONCONDUITE_ACTIVE ){ // instant de semis
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_GERMINATION ;
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = time;
// verification de coherence (dateLevee_casForcee non anterieur a semis)
if ( simulationPhaseSemisLevee == false ){
......@@ -214,8 +175,6 @@ public :
throw vle::utils::ModellingError("[Phenologie] Error dateLevee_casForcee");
}
}
} else {
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
}
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
......@@ -224,161 +183,76 @@ public :
break;
case PHASEPHENOPLANTE_GERMINATION :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_RECOLTEE ;
throw vle::utils::ModellingError("[Phenologie] Error recolte en germination ");
} else if ( simulationPhaseSemisLevee ){
if ( TT_A0() >= estimationTTentreSemisEtLevee_casPhaseSemisLeveeSimulee ){
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_JUVENILE ;
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = time;
} else {
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
}
} else { // not p.simulationPhaseSemisLevee
if ( utils::ordreChronologique( psi.dateLevee_casForcee, utils::dateJJMM(time) ) ){
// date levee (dateLevee_casForcee) atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_JUVENILE ;
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = time;
} else {
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
}
}
break;
case PHASEPHENOPLANTE_JUVENILE :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_RECOLTEE ;
throw vle::utils::ModellingError("[Phenologie] Error recolte pendant juvenile");
} else if ( TT_A2() >= pv.date_TT_E1 ){ // date thermique du stade etoiles atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_CROISSANCEACTIVE ;
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = time;
} else {
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
}
break;
case PHASEPHENOPLANTE_CROISSANCEACTIVE :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_RECOLTEE ;
throw vle::utils::ModellingError("[Phenologie] Error recolte pendant croissance active");
} else if ( TT_A2() >= pv.date_TT_F1 ){ // date thermique du stade floraison atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_FLORAISON ;
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = time;
} else {
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
}
break;
case PHASEPHENOPLANTE_FLORAISON :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_RECOLTEE ;
std::cout << "[Phenologie] Error recolte avant floraison" << "\n";
throw vle::utils::ModellingError("[Phenologie] Error recolte avant floraison");
} else if ( TT_A2() >= pv.date_TT_M0 ){ // date thermique du stade fin floraison atteinte
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_MATURATION ;
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = time;
} else {
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
}
break;
case PHASEPHENOPLANTE_MATURATION :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_RECOLTEE ;
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = time;
} else if ( TT_A2() >= pv.date_TT_M3 ){ // date
// thermique
// du stade
// maturite
// atteinte
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_DESSICATION ;
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = time;
} else {
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
}
break;
case PHASEPHENOPLANTE_DESSICATION :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
if ((int)ActionRecolte() == ACTIONCONDUITE_ACTIVE ){
PhasePhenoPlante_tmp = PHASEPHENOPLANTE_RECOLTEE ;
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = time;
} else {
//MODERATO
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
}
break;
case PHASEPHENOPLANTE_RECOLTEE :
photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION = photo_DatePsgPhasePhenoPlante_NONSEMEE_A_GERMINATION(-1);
photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE = photo_DatePsgPhasePhenoPlante_GERMINATION_A_JUVENILE(-1);
photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE = photo_DatePsgPhasePhenoPlante_JUVENILE_A_CROISSANCEACTIVE(-1);
photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON = photo_DatePsgPhasePhenoPlante_CROISSANCEACTIVE_A_FLORAISON(-1);
photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION = photo_DatePsgPhasePhenoPlante_FLORAISON_A_MATURATION(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_MATURATION_A_RECOLTEE(-1);
photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION = photo_DatePsgPhasePhenoPlante_MATURATION_A_DESSICATION(-1);
photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE = photo_DatePsgPhasePhenoPlante_DESSICATION_A_RECOLTEE(-1);
// ne fait rien
break;
default :
......
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