Commit 2e7be0f4 authored by Poulet Camille's avatar Poulet Camille
Browse files

Rename FishNutrient into NutrientRoutine

parent 19ad5295
...@@ -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>
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
<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>
......
...@@ -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, 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) {
......
...@@ -44,7 +44,7 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo ...@@ -44,7 +44,7 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
List<DiadromousFish> fishes = basin.getFishs(group); List<DiadromousFish> fishes = basin.getFishs(group);
// ON r-initialise notre map pour chauqe bassin // ON r-initialise notre map pour chauqe bassin
for (String nutrient : group.getFishNutrient().getNutrientsOfInterest()) { for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) {
totalOutputFluxes.put(nutrient, 0.); totalOutputFluxes.put(nutrient, 0.);
} }
totalOutputFluxes.put("biomass", 0.); //cration de la biomasse totalOutputFluxes.put("biomass", 0.); //cration de la biomasse
...@@ -54,10 +54,10 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo ...@@ -54,10 +54,10 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
destination = group.getEnvironment().getAssociatedSeaBasin(fish.getPosition()); destination = group.getEnvironment().getAssociatedSeaBasin(fish.getPosition());
fishesToMove.add(new Duo<DiadromousFish, Basin>(fish, destination)); //Mentionne la sortie d'un poisson de la boucle fishesToMove.add(new Duo<DiadromousFish, Basin>(fish, destination)); //Mentionne la sortie d'un poisson de la boucle
double biomass = group.getFishNutrient().getWeight(fish) * fish.getAmount(); double biomass = group.getNutrientRoutine().getWeight(fish) * fish.getAmount();
if (fish.getStage()==Stage.IMMATURE) { if (fish.getStage()==Stage.IMMATURE) {
Map <String, Double> aFluxExportedByJuveniles= group.getFishNutrient().computeNutrientsExportForJuveniles(fish); Map <String, Double> aFluxExportedByJuveniles= group.getNutrientRoutine().computeNutrientsExportForJuveniles(fish);
for (String nutrient: aFluxExportedByJuveniles.keySet()) { for (String nutrient: aFluxExportedByJuveniles.keySet()) {
totalOutputFluxes.put(nutrient,totalOutputFluxes.get(nutrient) + aFluxExportedByJuveniles.get(nutrient) * fish.getAmount()); totalOutputFluxes.put(nutrient,totalOutputFluxes.get(nutrient) + aFluxExportedByJuveniles.get(nutrient) * fish.getAmount());
} }
......
...@@ -111,7 +111,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -111,7 +111,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
//Initiate the total fluxes for this basin //Initiate the total fluxes for this basin
Map<String, Double> totalInputFluxes = new Hashtable<String, Double>(); //On crer la Map pour stocker les flux Map<String, Double> totalInputFluxes = new Hashtable<String, Double>(); //On crer la Map pour stocker les flux
for (String nutrient : group.getFishNutrient().getNutrientsOfInterest()) { for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) {
totalInputFluxes.put(nutrient, 0.); // ON MET A JOUR NOTRE map totalInputFluxes.put(nutrient, 0.); // ON MET A JOUR NOTRE map
} }
...@@ -193,10 +193,10 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -193,10 +193,10 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
if (survivalAmount > 0) {// SUperindividu est encore vivant mais il perd des effectifs if (survivalAmount > 0) {// SUperindividu est encore vivant mais il perd des effectifs
//Export for fishes survived after spawning (survivalAmount) : excretion + gametes //Export for fishes survived after spawning (survivalAmount) : excretion + gametes
Map <String, Double> aFluxAfterSurvival = group.getFishNutrient().computeNutrientsInputForSurvivalAfterSpawning(fish); Map <String, Double> aFluxAfterSurvival = group.getNutrientRoutine().computeNutrientsInputForSurvivalAfterSpawning(fish);
//Export for fishes that dies after spawning (fish.getAmount - survivalAmount): excretion + gametes + carcasse //Export for fishes that dies after spawning (fish.getAmount - survivalAmount): excretion + gametes + carcasse
Map<String, Double> aFluxForDeadFish = group.getFishNutrient().computeNutrientsInputForDeathAfterSpawning(fish); Map<String, Double> aFluxForDeadFish = group.getNutrientRoutine().computeNutrientsInputForDeathAfterSpawning(fish);
for (String nutrient: aFluxAfterSurvival.keySet()) { for (String nutrient: aFluxAfterSurvival.keySet()) {
//For survival fish //For survival fish
...@@ -207,7 +207,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -207,7 +207,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
} }
//compute biomass for dead fish //compute biomass for dead fish
biomass = group.getFishNutrient().getWeight(fish) * (fish.getAmount() - survivalAmount); biomass = group.getNutrientRoutine().getWeight(fish) * (fish.getAmount() - survivalAmount);
totalInputFluxes.put("biomass", totalInputFluxes.get("biomass") + biomass); totalInputFluxes.put("biomass", totalInputFluxes.get("biomass") + biomass);
//update the amount of individual in the super-individual //update the amount of individual in the super-individual
...@@ -218,12 +218,12 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -218,12 +218,12 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
deadFish.add(fish); deadFish.add(fish);
//Export for fished died before spawning (fish.getAmount): carcasses + excretion + gametes //Export for fished died before spawning (fish.getAmount): carcasses + excretion + gametes
Map<String, Double> aFlux = group.getFishNutrient().computeNutrientsInputForDeathAfterSpawning(fish); // Map<String, Double> aFlux = group.getNutrientRoutine().computeNutrientsInputForDeathAfterSpawning(fish); //
for (String nutrient: aFlux.keySet()) { for (String nutrient: aFlux.keySet()) {
totalInputFluxes.put(nutrient,totalInputFluxes.get(nutrient) + aFlux.get(nutrient) * fish.getAmount()); //Fish.getAmount - survivalAmount = total fishes died. totalInputFluxes.put(nutrient,totalInputFluxes.get(nutrient) + aFlux.get(nutrient) * fish.getAmount()); //Fish.getAmount - survivalAmount = total fishes died.
} }
biomass = group.getFishNutrient().getWeight(fish) * (fish.getAmount()); biomass = group.getNutrientRoutine().getWeight(fish) * (fish.getAmount());
totalInputFluxes.put("biomass", totalInputFluxes.get("biomass") + biomass); totalInputFluxes.put("biomass", totalInputFluxes.get("biomass") + biomass);
} }
} }
......
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