Commit 5837b920 authored by Lambert Patrick's avatar Lambert Patrick
Browse files

change name of function

parent 270faa2b
......@@ -35,7 +35,7 @@ public class RiverBasin extends Basin {
private QueueMemory<Double> lastRecsOverProdCaps;
private QueueMemory<Double> lastPercentagesOfAutochtones;
private QueueMemory<Double> numberOfNonNulRecruitmentDuringLastYears; // Prob of non nul recruitment during the last "memorySize" years... if 10 non nul recruitment during the last 10 year, p=0.999... if 8 non nul recruitment during the last 10 years, p = 0.8... if 0 recruitment, p = 0.001
private QueueMemory<Double> spawnersForFirstTimeMeanAges;
private QueueMemory<Double> femaleSpawnersForFirstTimeMeanAges;
private QueueMemory<Double> numberOfNonNulRecruitmentForFinalProbOfPres;
private double nativeSpawnerMortality; // mortality coefficient between recruitement and spawning for fish born in this basin
......@@ -98,7 +98,7 @@ public class RiverBasin extends Basin {
this.lastRecsOverProdCaps = new QueueMemory<Double>(memorySize);
this.lastPercentagesOfAutochtones = new QueueMemory<Double>(memorySize);
this.numberOfNonNulRecruitmentDuringLastYears = new QueueMemory<Double>(memorySize);
this.spawnersForFirstTimeMeanAges = new QueueMemory<Double>(memorySize);
this.femaleSpawnersForFirstTimeMeanAges = new QueueMemory<Double>(memorySize);
this.numberOfNonNulRecruitmentForFinalProbOfPres = new QueueMemory<Double>(memorySizeLongQueue);
if (cobservable == null) {
......@@ -189,8 +189,8 @@ public class RiverBasin extends Basin {
return numberOfNonNulRecruitmentDuringLastYears;
}
public QueueMemory<Double> getSpawnersForFirstTimeMeanAges() {
return spawnersForFirstTimeMeanAges;
public QueueMemory<Double> getFemaleSpawnersForFirstTimeMeanAges() {
return femaleSpawnersForFirstTimeMeanAges;
}
public QueueMemory<Double> getNumberOfNonNulRecruitmentForFinalProbOfPres(){
......
......@@ -619,13 +619,13 @@ public NutrientRoutine getNutrientRoutine() {
// statictis for calibration
// ================================================================
@Observable(description="Spawners For First Time Summary Statistic")
public double computeSpawnerForFirstTimeSummaryStatistic() {
public double computeFemaleSpawnerForFirstTimeSummaryStatistic() {
double sum = 0;
//TODO move TARGET to the right place
double TARGET = 5.0;
for (RiverBasin riverBasin : getEnvironment().getRiverBasins()) {
if (riverBasin.getSpawnersForFirstTimeMeanAges().getMeanWithoutZero() > 0.) {
double val = riverBasin.getSpawnersForFirstTimeMeanAges().getMeanWithoutZero() - TARGET;
if (riverBasin.getFemaleSpawnersForFirstTimeMeanAges().getMeanWithoutZero() > 0.) {
double val = riverBasin.getFemaleSpawnersForFirstTimeMeanAges().getMeanWithoutZero() - TARGET;
sum += val * val;
}
}
......
......@@ -219,9 +219,9 @@ public class ReproduceAndSurviveAfterReproduction extends AquaNismsGroupProcess<
// keep the number of spawners for the firt time in the basin
if (numberOfSpawnerForFirstTime>0){
riverBasin.getSpawnersForFirstTimeMeanAges().push(spawnersForFirstTimeAgesSum/numberOfSpawnerForFirstTime);
riverBasin.getFemaleSpawnersForFirstTimeMeanAges().push(spawnersForFirstTimeAgesSum/numberOfSpawnerForFirstTime);
}else{
riverBasin.getSpawnersForFirstTimeMeanAges().push(0.);
riverBasin.getFemaleSpawnersForFirstTimeMeanAges().push(0.);
}
//System.out.println("nb spawners in basin " + riverBasin.getName() + " : " + numberOfGenitors);
......
......@@ -334,9 +334,9 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// keep the number of spawners for the first time in the basin
if (numberOfFemaleSpawnerForFirstTime>0){
riverBasin.getSpawnersForFirstTimeMeanAges().push(femaleSpawnersForFirstTimeAgesSum/numberOfFemaleSpawnerForFirstTime);
riverBasin.getFemaleSpawnersForFirstTimeMeanAges().push(femaleSpawnersForFirstTimeAgesSum/numberOfFemaleSpawnerForFirstTime);
}else{
riverBasin.getSpawnersForFirstTimeMeanAges().push(0.);
riverBasin.getFemaleSpawnersForFirstTimeMeanAges().push(0.);
}
//System.out.println("nb spawners in basin " + riverBasin.getName() + " : " + numberOfGenitors);
......
......@@ -116,7 +116,7 @@ public class TypeTrajectoryCV extends AquaNismsGroupProcess<DiadromousFish, Diad
bW.write("likelihood;" + ((Double) group.computeLikelihood()).toString() + "\n");
bW.write("spawnersMatureAgeSumStat;" + group.computeSpawnerForFirstTimeSummaryStatistic() + "\n");
bW.write("spawnersMatureAgeSumStat;" + group.computeFemaleSpawnerForFirstTimeSummaryStatistic() + "\n");
bW.write("higherPopulatedLatitude;" + group.getHigherPopulatedLatitude() + "\n");
......
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