Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
record
sunflo
Commits
4553a12a
Commit
4553a12a
authored
Jul 30, 2019
by
RemiM
Committed by
Ronan Trepos
Sep 24, 2019
Browse files
Modify OC (TH) computation, without LLH
parent
94ab993b
Changes
3
Hide whitespace changes
Inline
Side-by-side
sunflo/exp/sunflo_web_modified_TT_new_model.vpz
View file @
4553a12a
...
...
@@ -16,20 +16,20 @@
</out>

</model>

<model
width=
"100"
height=
"255"
x=
"286"
y=
"64"
name=
"sunflo_bio"
type=
"coupled"
>

<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>
<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>

<out>

<port
name=
"ChgtPhasePhenoPlante"
/>

...
...
@@ -75,7 +75,7 @@
<port
name=
"Eb"
/>

</out>

</model>

<model
observables=
"diagnostic"
conditions=
"CONFIG_Plante,CONFIG_SimuInit,CONFIG_Variete,diagnostic,EXPERT_Plante,EXPERT_SimuInit"
width=
"100"
dynamics=
"diagnostic"
height=
"75"
x=
"56
2
"
y=
"
14
"
name=
"diagnostic"
type=
"atomic"
>

<model
observables=
"diagnostic"
conditions=
"CONFIG_Plante,CONFIG_SimuInit,CONFIG_Variete,diagnostic,EXPERT_Plante,EXPERT_SimuInit"
width=
"100"
dynamics=
"diagnostic"
height=
"75"
x=
"
10
56"
y=
"
353
"
name=
"diagnostic"
type=
"atomic"
>

<in>
<port
name=
"ChgtPhasePhenoPlante"
/>
<port
name=
"ETRETM"
/>
...
...
@@ -121,7 +121,7 @@
<port
name=
"Teff"
/>

</out>

</model>

<model
width=
"100"
height=
"195"
x=
"8
2
8"
y=
"
597
"
name=
"performances"
type=
"coupled"
>

<model
width=
"100"
height=
"195"
x=
"88
9
"
y=
"
624
"
name=
"performances"
type=
"coupled"
>

<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>

<out>
<port
name=
"IRs"
/>
...
...
@@ -159,6 +166,13 @@
<port
name=
"INN"
/>

<port
name=
"FTSW"
/>

<port
name=
"Eb"
/>

<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>

<out>

<port
name=
"TH"
/>

...
...
@@ -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>

</model>

<model
width=
"100"
height=
"330"
x=
"372"
y=
"577"
name=
"contraintes"
type=
"coupled"
>

...
...
@@ -905,10 +947,38 @@
<origin
model=
"sunflo_bio"
port=
"Tmoy"
/>
<destination
model=
"diagnostic"
port=
"Tmoy"
/>
</connection>
<connection
type=
"input"
>
<connection
type=
"input"
>
<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>

</model>

<model
width=
"100"
height=
"120"
x=
"19"
y=
"43"
name=
"climat"
type=
"coupled"
>

...
...
sunflo/src/Diagnostic.cpp
View file @
4553a12a
...
...
@@ -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 :
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
}
}
};
...
...
sunflo/src/ElaborationQualite.cpp
View file @
4553a12a
...
...
@@ -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,7 +289,18 @@ public :
+ 0.007 * LAD_MH() + 21.053 * MRUE_MH()
+ 0.832 * densite;
}
TH
=
TH_tmp
;
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
(
PhasePhenoPlante
()
==
PHASEPHENOPLANTE_DESSICATION
)){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment