Commit 72ce182b authored by Lambert Patrick's avatar Lambert Patrick
Browse files

without Map of queue

parent 5a4d001d
......@@ -37,7 +37,8 @@ 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 Map<DiadromousFish.Gender, QueueMemory<Double>> spawnersForFirstTimeMeanAges;;
private QueueMemory<Double> femaleSpawnersForFirstTimeMeanAges;
private QueueMemory<Double> maleSpawnersForFirstTimeMeanAges;
private QueueMemory<Double> numberOfNonNulRecruitmentForFinalProbOfPres;
private double nativeSpawnerMortality; // mortality coefficient between recruitement and spawning for fish born in this basin
......@@ -101,9 +102,9 @@ public class RiverBasin extends Basin {
this.lastPercentagesOfAutochtones = new QueueMemory<Double>(memorySize);
this.numberOfNonNulRecruitmentDuringLastYears = new QueueMemory<Double>(memorySize);
this.spawnersForFirstTimeMeanAges = new Hashtable<DiadromousFish.Gender, QueueMemory<Double>>();
this.spawnersForFirstTimeMeanAges.put( DiadromousFish.Gender.FEMALE, new QueueMemory<Double>(memorySize) );
this.spawnersForFirstTimeMeanAges.put( DiadromousFish.Gender.MALE, new QueueMemory<Double>(memorySize) );
this.femaleSpawnersForFirstTimeMeanAges = new QueueMemory<Double>(memorySize) ;
this.maleSpawnersForFirstTimeMeanAges = new QueueMemory<Double>(memorySize);
this.numberOfNonNulRecruitmentForFinalProbOfPres = new QueueMemory<Double>(memorySizeLongQueue);
......@@ -200,7 +201,12 @@ public class RiverBasin extends Basin {
}*/
public QueueMemory<Double> getSpawnersForFirstTimeMeanAges(DiadromousFish.Gender gender) {
return spawnersForFirstTimeMeanAges.get(gender);
if (gender == Gender.FEMALE)
return femaleSpawnersForFirstTimeMeanAges;
else if (gender == Gender.MALE)
return maleSpawnersForFirstTimeMeanAges;
else
return null;
}
public QueueMemory<Double> getNumberOfNonNulRecruitmentForFinalProbOfPres(){
......
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