Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
997e3c55
Commit
997e3c55
authored
Sep 11, 2019
by
Lambert Patrick
Browse files
exploration of calibration result
There a pb with male length
parent
c1709bac
Changes
4
Hide whitespace changes
Inline
Side-by-side
data/input/fishTryRealBV_CC.xml
View file @
997e3c55
...
...
@@ -259,8 +259,8 @@
<tempMinGrow>
3.0
</tempMinGrow>
<tempMaxGrow>
26.0
</tempMaxGrow>
<tempOptGrow>
17.0
</tempOptGrow>
<kOptForFemale>
0.
5363472
</kOptForFemale>
<kOptForMale>
0.3
9
00
707
</kOptForMale>
<kOptForFemale>
0.
20323011454056628
</kOptForFemale>
<kOptForMale>
0.300
4992503785338
</kOptForMale>
<sigmaDeltaLVonBert>
0.2
</sigmaDeltaLVonBert>
</species.Grow>
...
...
@@ -309,7 +309,7 @@
<species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
<reproductionSeason>
SPRING
</reproductionSeason>
<tempMinRep>
9.846984
</tempMinRep>
<tempMinRep>
10.443039492695249
</tempMinRep>
<tempMaxRep>
26.0
</tempMaxRep>
<tempOptRep>
20.0
</tempOptRep>
<eta>
2.4
</eta>
...
...
data/input/obsTryReal.xml
View file @
997e3c55
...
...
@@ -46,6 +46,23 @@
<variableName>
getMeanLengthOfFemaleSpawnerForFirstTime
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<graphType>
LINE
</graphType>
<title>
Mean age of male spawners
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
age (year)
</yAxisLabel>
<variableName>
getMeanLengthOfMaleSpawnerForFirstTime
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
<graphType>
LINE
</graphType>
<title>
Statistic for male spawners age
</title>
<xAxisLabel>
Time (season)
</xAxisLabel>
<yAxisLabel>
age (year)
</yAxisLabel>
<variableName>
computeMaleSpawnerForFirstTimeSummaryStatistic
</variableName>
</fr.cemagref.observation.observers.jfreechart.TemporalSerieChart>
</observers>
</fr.cemagref.observation.kernel.ObservablesHandler>
</entry>
...
...
src/main/java/species/Calibrate.java
View file @
997e3c55
...
...
@@ -112,7 +112,8 @@ public class Calibrate {
cma
.
println
(
"Best function value "
+
cma
.
getBestFunctionValue
()
+
" at evaluation "
+
cma
.
getBestEvaluationNumber
());
cma
.
println
(
"best par: "
+
Arrays
.
toString
(
fitfun
.
x2par
(
cma
.
getBestX
())));
cma
.
println
(
"best sol: "
+
Arrays
.
toString
(
fitfun
.
x2par
(
cma
.
getBestSolution
().
getX
())));
System
.
out
.
println
(
"\n"
+
fitfun
.
valueOf
(
cma
.
getBestX
()));
System
.
out
.
println
();
for
(
int
i
=
0
;
i
<
pop
.
length
;
i
++)
{
System
.
out
.
println
(
Arrays
.
toString
(
fitfun
.
x2par
((
pop
[
i
]))));
...
...
@@ -153,7 +154,6 @@ class GR3DObjeciveFunction implements IObjectiveFunction {
}
@Override
public
double
valueOf
(
double
[]
x
)
{
// x[0] tempMinRep
...
...
@@ -161,7 +161,6 @@ class GR3DObjeciveFunction implements IObjectiveFunction {
// x[2] kOptMale
double
[]
par
=
x2par
(
x
);
// in natural unit
try
{
pilot
.
load
();
...
...
@@ -192,6 +191,8 @@ class GR3DObjeciveFunction implements IObjectiveFunction {
maleLengthPenalty
=
(
double
)
ReflectUtils
.
getValueFromPath
(
pilot
,
"aquaticWorld.aquaNismsGroupsList.0.computeMaleSpawnerForFirstTimeSummaryStatistic"
);
//System.out.println("maleLengthPenalty: "+maleLengthPenalty);
System
.
out
.
println
(
"likelihood: "
+
likelihood
+
" femaleLengthPenalty: "
+
femaleLengthPenalty
+
" maleLengthPenalty: "
+
maleLengthPenalty
);
}
catch
(
NoSuchFieldException
|
IllegalArgumentException
|
IllegalAccessException
|
InvocationTargetException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
...
...
src/main/java/species/DiadromousFishGroup.java
View file @
997e3c55
...
...
@@ -660,6 +660,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
sum
+=
val
*
val
;
}
}
System
.
out
.
println
(
"sum female: "
+
sum
);
return
sum
;
}
...
...
@@ -691,6 +692,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
sum
+=
val
*
val
;
}
}
System
.
out
.
println
(
"sum male: "
+
sum
);
return
sum
;
}
...
...
@@ -698,6 +700,20 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
public
double
computeMaleSpawnerForFirstTimeSummaryStatistic
()
{
return
computeMaleSpawnerForFirstTimeSummaryStatisticWithTarget
(
4.5
);
}
@Observable
(
description
=
"mean length for male spawners For First Time"
)
public
double
getMeanLengthOfMaleSpawnerForFirstTime
()
{
double
sum
=
0
;
double
nb
=
0
;
for
(
RiverBasin
riverBasin
:
getEnvironment
().
getRiverBasins
())
{
if
(
riverBasin
.
getSpawnersForFirstTimeMeanAges
(
Gender
.
MALE
).
getMeanWithoutZero
()
>
0
.)
{
nb
++;
sum
+=
riverBasin
.
getSpawnersForFirstTimeMeanAges
(
Gender
.
MALE
).
getMeanWithoutZero
()
;
}
}
return
sum
/
nb
;
}
@Observable
(
description
=
"Likelihood Summary stat"
)
public
double
computeLikelihood
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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