Commit dd3a6cb5 authored by Lambert Patrick's avatar Lambert Patrick
Browse files

fusion avec Camille

parents 8b24a024 8c107625
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<linfVonBert>60.0</linfVonBert> <linfVonBert>60.0</linfVonBert>
<dMaxDisp>300.0</dMaxDisp> <dMaxDisp>300.0</dMaxDisp>
<lFirstMaturity>40.0</lFirstMaturity> <lFirstMaturity>40.0</lFirstMaturity>
<fishNutrient> <nutrientRoutine>
<nutrientsOfInterest> <nutrientsOfInterest>
<string>N</string> <string>N</string>
<string>P</string> <string>P</string>
...@@ -30,6 +30,14 @@ ...@@ -30,6 +30,14 @@
<entry> <entry>
<species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender> <species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender>
<hashtable> <hashtable>
<entry>
<string>bLW_Gonad</string>
<double>3.3838</double>
</entry>
<entry>
<string>aLW_Gonad</string>
<double>-8.8744</double>
</entry>
<entry> <entry>
<string>bLW</string> <string>bLW</string>
<double>2.1774</double> <double>2.1774</double>
...@@ -43,6 +51,14 @@ ...@@ -43,6 +51,14 @@
<entry> <entry>
<species.DiadromousFish_-Gender>FEMALE</species.DiadromousFish_-Gender> <species.DiadromousFish_-Gender>FEMALE</species.DiadromousFish_-Gender>
<hashtable> <hashtable>
<entry>
<string>bLW_Gonad</string>
<double>2.6729</double>
</entry>
<entry>
<string>aLW_Gonad</string>
<double>-5.2425</double>
</entry>
<entry> <entry>
<string>bLW</string> <string>bLW</string>
<double>3.147</double> <double>3.147</double>
...@@ -58,6 +74,14 @@ ...@@ -58,6 +74,14 @@
<entry> <entry>
<species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender> <species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender>
<hashtable> <hashtable>
<entry>
<string>bLW_Gonad</string>
<double>3.8331</double>
</entry>
<entry>
<string>aLW_Gonad</string>
<double>-11.285</double>
</entry>
<entry> <entry>
<string>bLW</string> <string>bLW</string>
<double>2.9973</double> <double>2.9973</double>
...@@ -71,6 +95,14 @@ ...@@ -71,6 +95,14 @@
<entry> <entry>
<species.DiadromousFish_-Gender>FEMALE</species.DiadromousFish_-Gender> <species.DiadromousFish_-Gender>FEMALE</species.DiadromousFish_-Gender>
<hashtable> <hashtable>
<entry>
<string>bLW_Gonad</string>
<double>2.8545</double>
</entry>
<entry>
<string>aLW_Gonad</string>
<double>-6.6234</double>
</entry>
<entry> <entry>
<string>bLW</string> <string>bLW</string>
<double>2.9418</double> <double>2.9418</double>
...@@ -92,16 +124,6 @@ ...@@ -92,16 +124,6 @@
<double>0.006986429759979109</double> <double>0.006986429759979109</double>
</entry> </entry>
</juvenileFeatures> </juvenileFeatures>
<spawnedGametesWeight class="hashtable">
<entry>
<species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender>
<double>44.8</double>
</entry>
<entry>
<species.DiadromousFish_-Gender>FEMALE</species.DiadromousFish_-Gender>
<double>131.0</double>
</entry>
</spawnedGametesWeight>
<compoCarcassPreSpawning class="hashtable"> <compoCarcassPreSpawning class="hashtable">
<entry> <entry>
<species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender> <species.DiadromousFish_-Gender>MALE</species.DiadromousFish_-Gender>
...@@ -196,7 +218,8 @@ ...@@ -196,7 +218,8 @@
<double>0.02803</double> <double>0.02803</double>
</entry> </entry>
</compoJuvenile> </compoJuvenile>
</fishNutrient> </nutrientRoutine>
<fileNameInputForInitialObservation>data/input/reality/Obs1900.csv</fileNameInputForInitialObservation> <fileNameInputForInitialObservation>data/input/reality/Obs1900.csv</fileNameInputForInitialObservation>
<centileForRange>0.95</centileForRange> <centileForRange>0.95</centileForRange>
<parameterSetfileName>data/input/reality/parameterSet.csv</parameterSetfileName> <parameterSetfileName>data/input/reality/parameterSet.csv</parameterSetfileName>
...@@ -245,19 +268,16 @@ ...@@ -245,19 +268,16 @@
<meanBvSurface>17351</meanBvSurface> <meanBvSurface>17351</meanBvSurface>
<standardDeviationBvSurface>35594</standardDeviationBvSurface> <standardDeviationBvSurface>35594</standardDeviationBvSurface>
<meanInterDistance>300.0</meanInterDistance> <meanInterDistance>300.0</meanInterDistance>
<standardDeviationInterDistance>978.0 <standardDeviationInterDistance>978.0</standardDeviationInterDistance>
</standardDeviationInterDistance>
<pHomingForReachEquil>0.75</pHomingForReachEquil> <pHomingForReachEquil>0.75</pHomingForReachEquil>
<pHomingAfterEquil>0.75</pHomingAfterEquil> <pHomingAfterEquil>0.75</pHomingAfterEquil>
<NbYearForInstallPop>0</NbYearForInstallPop> <NbYearForInstallPop>0</NbYearForInstallPop>
<riverMigrationSeason>SPRING</riverMigrationSeason> <riverMigrationSeason>SPRING</riverMigrationSeason>
<alpha2Rep>0.0</alpha2Rep> <alpha2Rep>0.0</alpha2Rep>
<meanSpawnersLengthAtRepro>45.0</meanSpawnersLengthAtRepro> <meanSpawnersLengthAtRepro>45.0</meanSpawnersLengthAtRepro>
<standardDeviationOfSpawnersLengthAtRepro>2.0 <standardDeviationOfSpawnersLengthAtRepro>2.0</standardDeviationOfSpawnersLengthAtRepro>
</standardDeviationOfSpawnersLengthAtRepro>
<weightOfDeathBasin>0.4</weightOfDeathBasin> <weightOfDeathBasin>0.4</weightOfDeathBasin>
</species.DisperseAndMigrateToRiverWithMultiNomDistriAndDeathBasin> </species.DisperseAndMigrateToRiverWithMultiNomDistriAndDeathBasin>
<species.Survive> <species.Survive>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<tempMinMortGenInRiv>10.0</tempMinMortGenInRiv> <tempMinMortGenInRiv>10.0</tempMinMortGenInRiv>
...@@ -268,8 +288,6 @@ ...@@ -268,8 +288,6 @@
<mortalityRateInSea>0.4</mortalityRateInSea> <mortalityRateInSea>0.4</mortalityRateInSea>
<mortalityRateInOffshore>0.4</mortalityRateInOffshore> <mortalityRateInOffshore>0.4</mortalityRateInOffshore>
</species.Survive> </species.Survive>
<species.ReproduceAndSurviveAfterReproductionWithDiagnose> <species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<reproductionSeason>SPRING</reproductionSeason> <reproductionSeason>SPRING</reproductionSeason>
...@@ -314,8 +332,7 @@ ...@@ -314,8 +332,7 @@
</species.IdentifyPopulation> </species.IdentifyPopulation>
<species.TypeTrajectoryCV> <species.TypeTrajectoryCV>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<fileNameOutput>JeuParam100_2100RCP85_A_essai <fileNameOutput>JeuParam100_2100RCP85_A_essai</fileNameOutput>
</fileNameOutput>
</species.TypeTrajectoryCV> </species.TypeTrajectoryCV>
</processesAtEnd> </processesAtEnd>
......
...@@ -62,7 +62,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe ...@@ -62,7 +62,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
* Routine to compute nutrient fluxes operated by a single individual (TODO by a single super individual). * Routine to compute nutrient fluxes operated by a single individual (TODO by a single super individual).
* *
*/ */
private FishNutrient fishNutrient; private NutrientRoutine nutrientRoutine;
public String fileNameInputForInitialObservation = "data/input/reality/Obs1900.csv"; public String fileNameInputForInitialObservation = "data/input/reality/Obs1900.csv";
...@@ -265,7 +265,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe ...@@ -265,7 +265,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
diadromousFishGroup.fishNutrient = new FishNutrient(nutrientsOfInterest,aResidenceTime, anExcretionRate, aFeaturePreSpawning, aFeaturePostSpawning, aGameteSpawned, diadromousFishGroup.nutrientRoutine = new NutrientRoutine(nutrientsOfInterest,aResidenceTime, anExcretionRate, aFeaturePreSpawning, aFeaturePostSpawning,
aCompoCarcassPreSpawning, aCompoCarcassPostSpawning, aCompoGametes, aCompoCarcassPreSpawning, aCompoCarcassPostSpawning, aCompoGametes,
aJuvenileFeatures, aCompoJuveniles); aJuvenileFeatures, aCompoJuveniles);
...@@ -507,9 +507,9 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe ...@@ -507,9 +507,9 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
return lFirstMaturity; return lFirstMaturity;
} }
public FishNutrient getFishNutrient() { public NutrientRoutine getNutrientRoutine() {
return fishNutrient; return nutrientRoutine;
} }
public void setlFirstMaturity(double lFirstMaturity) { public void setlFirstMaturity(double lFirstMaturity) {
......
...@@ -9,8 +9,13 @@ import environment.Time; ...@@ -9,8 +9,13 @@ import environment.Time;
import environment.Time.Season; import environment.Time.Season;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess; import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List; import java.util.List;
import java.util.Map;
import miscellaneous.Duo; import miscellaneous.Duo;
import species.DiadromousFish.Stage;
import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = AquaNismsGroupProcess.class) @ServiceProvider(service = AquaNismsGroupProcess.class)
...@@ -28,19 +33,48 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo ...@@ -28,19 +33,48 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
if (Time.getSeason(group.getPilot()) == seaMigrationSeason ){ if (Time.getSeason(group.getPilot()) == seaMigrationSeason ){
Basin destination; Basin destination;
List<Duo<DiadromousFish,Basin>> fishesToMove = new ArrayList<Duo<DiadromousFish,Basin>>();
for (int i = 0; i < group.getEnvironment().getRiverBasins().length; i++) { //On crer la Map pour stocker les flux d'export
RiverBasin basin = group.getEnvironment().getRiverBasins()[i]; Map<String, Double> totalOutputFluxes = new Hashtable<String, Double>();
List<DiadromousFish> fishes = basin.getFishs(group); List<Duo<DiadromousFish,Basin>> fishesToMove = new ArrayList<Duo<DiadromousFish,Basin>>();
if (fishes!=null) for (DiadromousFish fish : fishes) { for (int i = 0; i < group.getEnvironment().getRiverBasins().length; i++) {
destination = group.getEnvironment().getAssociatedSeaBasin(fish.getPosition()); RiverBasin basin = group.getEnvironment().getRiverBasins()[i];
fishesToMove.add(new Duo<DiadromousFish, Basin>(fish, destination)); //Fish move to sea and compute the related export of nutrients
} List<DiadromousFish> fishes = basin.getFishs(group);
}
for (Duo<DiadromousFish,Basin> duo : fishesToMove) { // ON r-initialise notre map pour chauqe bassin
duo.getFirst().moveTo(group.getPilot(), duo.getSecond(), group); for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) {
} totalOutputFluxes.put(nutrient, 0.);
} }
totalOutputFluxes.put("biomass", 0.); //cration de la biomasse
if (fishes!=null) {
for (DiadromousFish fish : fishes) {
destination = group.getEnvironment().getAssociatedSeaBasin(fish.getPosition());
fishesToMove.add(new Duo<DiadromousFish, Basin>(fish, destination)); //Mentionne la sortie d'un poisson de la boucle
double biomass = group.getNutrientRoutine().getWeight(fish) * fish.getAmount();
if (fish.getStage()==Stage.IMMATURE) {
Map <String, Double> aFluxExportedByJuveniles= group.getNutrientRoutine().computeNutrientsExportForJuveniles(fish);
for (String nutrient: aFluxExportedByJuveniles.keySet()) {
totalOutputFluxes.put(nutrient,totalOutputFluxes.get(nutrient) + aFluxExportedByJuveniles.get(nutrient) * fish.getAmount());
}
totalOutputFluxes.put("biomass", totalOutputFluxes.get("biomass") + biomass);
}
}
}
for (Duo<DiadromousFish,Basin> duo : fishesToMove) {
duo.getFirst().moveTo(group.getPilot(), duo.getSecond(), group); //on dplace les poissons dans le fichier MoveTo et on dnote la destination du poisson.
}
System.out.println(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot()) + ";EXPORT;"
+ basin.getName() + "; " + totalOutputFluxes);
}
}
} }
} }
\ No newline at end of file
...@@ -163,6 +163,7 @@ public class ReproduceAndSurviveAfterReproduction extends AquaNismsGroupProcess< ...@@ -163,6 +163,7 @@ public class ReproduceAndSurviveAfterReproduction extends AquaNismsGroupProcess<
survivalAmount = Miscellaneous.binomialForSuperIndividual(group.getPilot(), fish.getAmount(), survivalRateAfterReproduction); survivalAmount = Miscellaneous.binomialForSuperIndividual(group.getPilot(), fish.getAmount(), survivalRateAfterReproduction);
if (survivalAmount > 0) if (survivalAmount > 0)
fish.setAmount(survivalAmount); fish.setAmount(survivalAmount);
else else
deadFish.add(fish); deadFish.add(fish);
} }
......
...@@ -108,20 +108,23 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -108,20 +108,23 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
List<DiadromousFish> fishInBasin = riverBasin.getFishs(group); List<DiadromousFish> fishInBasin = riverBasin.getFishs(group);
if (fishInBasin != null){ if (fishInBasin != null){
Map<String, Double> totalFluxes = new Hashtable<String, Double>(); //On cr�er la Map pour stocker les flux //Initiate the total fluxes for this basin
Map<String, Map<String, Double>> totalInputFluxes = new Hashtable<String, Map <String, Double>>(); //On crer la Map pour stocker les flux
for (String nutrient : group.getFishNutrient().getNutrientsOfInterest()) { totalInputFluxes.put("autochtonous", new Hashtable < String, Double>());
totalInputFluxes.put("allochtonous", new Hashtable < String, Double>());
totalFluxes.put(nutrient, 0.); // ON MET A JOUR NOTRE map for (String origin: totalInputFluxes.keySet()) {
for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) {
totalInputFluxes.get(origin).put(nutrient, 0.); // ON MET A JOUR NOTRE map
}
totalInputFluxes.get(origin).put("biomass",0.);
} }
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
// definition of the stock recruiment relationship // definition of the stock recruiment relationship
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
// effective temperature for reproduction (priority to the ANG value) // effective temperature for reproduction (priority to the ANG value)
double tempEffectRep; double tempEffectRep;
if (Double.isNaN(group.getTempMinRep())){ if (Double.isNaN(group.getTempMinRep())){
...@@ -152,7 +155,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -152,7 +155,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// initilisation of the stock recruitment relationship // initilisation of the stock recruitment relationship
stockRecruitmentRelationship.init(alpha, beta, S50, S95); stockRecruitmentRelationship.init(alpha, beta, S50, S95);
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
// calulation of the spawner number // calulation of the spawner number
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
...@@ -162,15 +165,15 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -162,15 +165,15 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// compute the number of spawners and keep the origines of the spawners // compute the number of spawners and keep the origines of the spawners
for (DiadromousFish fish : fishInBasin){ for (DiadromousFish fish : fishInBasin){
if (fish.getGender() == Gender.FEMALE & fish.isMature()){ if (fish.getGender() == Gender.FEMALE & fish.isMature()){
//System.out.println(fish.getAge() + " -> "+ fish.getLength() + " ("+fish.getStage()+")"); //System.out.println(fish.getAge() + " -> "+ fish.getLength() + " ("+fish.getStage()+")");
if (fish.getNumberOfReproduction() < 1) { if (fish.getNumberOfReproduction() < 1) {
numberOfFemaleSpawnerForFirstTime++; numberOfFemaleSpawnerForFirstTime++;
femaleSpawnersForFirstTimeAgesSum += fish.getAge(); femaleSpawnersForFirstTimeAgesSum += fish.getAge();
} }
numberOfFemaleGenitors += fish.getAmount() ; numberOfFemaleGenitors += fish.getAmount() ; // on ajoute a chaque fois le fish.getAmount (CcumSum)
// spawner per origine // spawner per origine
String basinName = fish.getBirthBasin().getName(); String basinName = fish.getBirthBasin().getName();
...@@ -190,11 +193,49 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -190,11 +193,49 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
fish.incNumberOfReproduction(); fish.incNumberOfReproduction();
// survival after reproduction (semelparity or iteroparity) of SI (change the amount of the SI) // survival after reproduction (semelparity or iteroparity) of SI (change the amount of the SI)
survivalAmount = Miscellaneous.binomialForSuperIndividual(group.getPilot(), fish.getAmount(), survivalRateAfterReproduction); survivalAmount = Miscellaneous.binomialForSuperIndividual(group.getPilot(), fish.getAmount(), survivalRateAfterReproduction);
if (survivalAmount > 0) double biomass = 0.;
fish.setAmount(survivalAmount); String origin;
if(fish.getBirthBasin()== riverBasin)
origin = "autochtonous";
else else
origin = "allochtonous";
if (survivalAmount > 0) {// SUperindividu est encore vivant mais il perd des effectifs
//Export for fishes survived after spawning (survivalAmount) : excretion + gametes
Map <String, Double> aFluxAfterSurvival = group.getNutrientRoutine().computeNutrientsInputForSurvivalAfterSpawning(fish);
//Export for fishes that dies after spawning (fish.getAmount - survivalAmount): excretion + gametes + carcasse
Map<String, Double> aFluxForDeadFish = group.getNutrientRoutine().computeNutrientsInputForDeathAfterSpawning(fish);
for (String nutrient: aFluxAfterSurvival.keySet()) {
//For survival fish
totalInputFluxes.get(origin).put(nutrient,totalInputFluxes.get(origin).get(nutrient) + aFluxAfterSurvival.get(nutrient) * survivalAmount);
//For dead fish
totalInputFluxes.get(origin).put(nutrient,totalInputFluxes.get(origin).get(nutrient) + aFluxForDeadFish.get(nutrient) * (fish.getAmount() - survivalAmount));
}
//compute biomass for dead fish
biomass = group.getNutrientRoutine().getWeight(fish) * (fish.getAmount() - survivalAmount);
totalInputFluxes.get(origin).put("biomass", totalInputFluxes.get(origin).get("biomass") + biomass);
//update the amount of individual in the super-individual
fish.setAmount(survivalAmount);
}
else {
//Le superindividu est mort !!!
deadFish.add(fish); deadFish.add(fish);
//Export for fished died before spawning (fish.getAmount): carcasses + excretion + gametes
Map<String, Double> aFlux = group.getNutrientRoutine().computeNutrientsInputForDeathAfterSpawning(fish); //
for (String nutrient: aFlux.keySet()) {
totalInputFluxes.get(origin).put(nutrient,totalInputFluxes.get(origin).get(nutrient) + aFlux.get(nutrient) * fish.getAmount()); //Fish.getAmount - survivalAmount = total fishes died.
}
biomass = group.getNutrientRoutine().getWeight(fish) * (fish.getAmount());
totalInputFluxes.get(origin).put("biomass", totalInputFluxes.get(origin).get("biomass") + biomass);
}
} }
} }
...@@ -269,9 +310,9 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -269,9 +310,9 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
// Reproduction process (number of recruits) // Reproduction process (number of recruits)
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
if (numberOfFemaleGenitors > 0.) { if (numberOfFemaleGenitors > 0.) {
//BH Stock-Recruitment relationship with logistic depensation //BH Stock-Recruitment relationship with logistic depensation
double meanNumberOfRecruit = stockRecruitmentRelationship.getRecruitment(numberOfFemaleGenitors); double meanNumberOfRecruit = stockRecruitmentRelationship.getRecruitment(numberOfFemaleGenitors);
...@@ -280,7 +321,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -280,7 +321,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
long numberOfRecruit = Math.round(Math.exp(genNormal.nextDouble()*sigmaRecruitment + muRecruitment)); long numberOfRecruit = Math.round(Math.exp(genNormal.nextDouble()*sigmaRecruitment + muRecruitment));
//System.out.println(group.getPilot().getCurrentTime()+" "+Time.getSeason(group.getPilot())+" "+ riverBasin.getName()+": " + numberOfGenitors + " spwaners \tgive "+ numberOfRecruit + " recruits"); //System.out.println(group.getPilot().getCurrentTime()+" "+Time.getSeason(group.getPilot())+" "+ riverBasin.getName()+": " + numberOfGenitors + " spwaners \tgive "+ numberOfRecruit + " recruits");
// keep last % of autochtone // keep last % of autochtone
riverBasin.getLastPercentagesOfAutochtones().push(numberOfAutochtones * 100 / numberOfFemaleGenitors); riverBasin.getLastPercentagesOfAutochtones().push(numberOfAutochtones * 100 / numberOfFemaleGenitors);
...@@ -350,28 +391,18 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -350,28 +391,18 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// Remove deadfish and compute the related nutrient fluxes // Remove deadfish and compute the related nutrient fluxes
// -------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------
for (DiadromousFish fish : deadFish){ for (DiadromousFish fish : deadFish){
Map<String, Double> aFlux = group.getFishNutrient().computeNutrientsInputForDeathAfterSpawning(fish); //
for (String nutrient: aFlux.keySet()) {
totalFluxes.put(nutrient,totalFluxes.get(nutrient) + aFlux.get(nutrient) * fish.getAmount());
}
group.removeAquaNism(fish); group.removeAquaNism(fish);
} }
deadFish.clear(); deadFish.clear();
//System.out.println(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot()) + ";" System.out.println(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot()) + ";IMPORT;"
//+ riverBasin.getName() + "; " + totalFluxes); + riverBasin.getName() + "; " + totalInputFluxes);
} }
else { else {
riverBasin.setYearOfLastNulRep(Time.getYear(group.getPilot())); riverBasin.setYearOfLastNulRep(Time.getYear(group.getPilot()));
} }
// System.out.println("("+numberOfGenitors+")"); // System.out.println("("+numberOfGenitors+")");
//System.out.println(" BEFORE " +riverBasin.getSpawnerOrigins().keySet()); //System.out.println(" BEFORE " +riverBasin.getSpawnerOrigins().keySet());
......
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