Commit 997e3c55 authored by Lambert Patrick's avatar Lambert Patrick
Browse files

exploration of calibration result

There a pb with male length
parent c1709bac
......@@ -259,8 +259,8 @@
<tempMinGrow>3.0</tempMinGrow>
<tempMaxGrow>26.0</tempMaxGrow>
<tempOptGrow>17.0</tempOptGrow>
<kOptForFemale>0.5363472</kOptForFemale>
<kOptForMale>0.3900707</kOptForMale>
<kOptForFemale>0.20323011454056628</kOptForFemale>
<kOptForMale>0.3004992503785338</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>
......
......@@ -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>
......
......@@ -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();
......
......@@ -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() {
......
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