Commit 31ba887c authored by Poulet Camille's avatar Poulet Camille
Browse files

Abundance_Correction

parent c5661d58
...@@ -83,13 +83,20 @@ ...@@ -83,13 +83,20 @@
<double>-11.285</double> <double>-11.285</double>
</entry> </entry>
<entry> <entry>
- <string>bLW</string> -
- <double>2.9973</double> <string>bLW</string>
- </entry> -
- <entry> <double>2.9973</double>
- <string>aLW</string> -
- <double>0.010383887012522573</double> </entry>
- </entry> -
<entry>
-
<string>aLW</string>
-
<double>0.010383887012522573</double>
-
</entry>
</hashtable> </hashtable>
</entry> </entry>
<entry> <entry>
...@@ -104,13 +111,20 @@ ...@@ -104,13 +111,20 @@
<double>-6.6234</double> <double>-6.6234</double>
</entry> </entry>
<entry> <entry>
- <string>bLW</string> -
- <double>2.9418</double> <string>bLW</string>
- </entry> -
- <entry> <double>2.9418</double>
- <string>aLW</string> -
- <double>0.013199187556948952</double> </entry>
- </entry> -
<entry>
-
<string>aLW</string>
-
<double>0.013199187556948952</double>
-
</entry>
</hashtable> </hashtable>
</entry> </entry>
</fishFeaturesPostSpawning> </fishFeaturesPostSpawning>
...@@ -279,7 +293,7 @@ ...@@ -279,7 +293,7 @@
<standardDeviationOfSpawnersLengthAtRepro>2.0</standardDeviationOfSpawnersLengthAtRepro> <standardDeviationOfSpawnersLengthAtRepro>2.0</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>
...@@ -290,13 +304,20 @@ ...@@ -290,13 +304,20 @@
<mortalityRateInSea>0.4</mortalityRateInSea> <mortalityRateInSea>0.4</mortalityRateInSea>
<mortalityRateInOffshore>0.4</mortalityRateInOffshore> <mortalityRateInOffshore>0.4</mortalityRateInOffshore>
</species.Survive> </species.Survive>
<species.ExportFluxes> <species.ExportFluxes>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<exportSeason>SPRING</exportSeason> <exportSeason>SPRING</exportSeason>
<fileNameOutput>EffectiveFluxes</fileNameOutput> <fileNameOutput>EffectiveFluxes</fileNameOutput>
</species.ExportFluxes> </species.ExportFluxes>
<species.ExportBiomass>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<survivalRateAfterReproduction>0.1</survivalRateAfterReproduction>
<exportSeason>SPRING</exportSeason>
<fileNameOutput>BiomassFluxes</fileNameOutput>
</species.ExportBiomass>
<species.ReproduceAndSurviveAfterReproductionWithDiagnose> <species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<reproductionSeason>SPRING</reproductionSeason> <reproductionSeason>SPRING</reproductionSeason>
......
...@@ -66,12 +66,20 @@ public class RiverBasin extends Basin { ...@@ -66,12 +66,20 @@ public class RiverBasin extends Basin {
public double getSpawnerNumber() { public double getSpawnerNumber() {
long nbSpawn = 0; long nbSpawn = 0;
for (DiadromousFishGroup group : this.getGroups()) { for (DiadromousFishGroup group : this.getGroups()) {
nbSpawn += getSpawnerNumberPerGroup(group);
}
return nbSpawn;
}
public double getSpawnerNumberPerGroup(DiadromousFishGroup group) {
long nbSpawn = 0;
for (DiadromousFish fish : this.getFishs(group)) { for (DiadromousFish fish : this.getFishs(group)) {
if (fish.isMature()) { if (fish.isMature()) {
nbSpawn += fish.getAmount(); nbSpawn += fish.getAmount();
} }
} }
}
return nbSpawn; return nbSpawn;
} }
......
...@@ -37,7 +37,7 @@ public class ExportBiomass extends AquaNismsGroupProcess<DiadromousFish, Diadrom ...@@ -37,7 +37,7 @@ public class ExportBiomass extends AquaNismsGroupProcess<DiadromousFish, Diadrom
public static void main(String[] args) { public static void main(String[] args) {
System.out.println((new XStream(new DomDriver())) System.out.println((new XStream(new DomDriver()))
.toXML(new ExportFluxes())); .toXML(new ExportBiomass()));
} }
/* (non-Javadoc) /* (non-Javadoc)
......
...@@ -60,6 +60,7 @@ public class ExportFluxes extends AquaNismsGroupProcess<DiadromousFish, Diadromo ...@@ -60,6 +60,7 @@ public class ExportFluxes extends AquaNismsGroupProcess<DiadromousFish, Diadromo
for (String birthBasinName : group.getEnvironment().getRiverBasinNames()) { for (String birthBasinName : group.getEnvironment().getRiverBasinNames()) {
bW.write(sep + birthBasinName); // write each basin name in the file bW.write(sep + birthBasinName); // write each basin name in the file
} }
bW.write("\n");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -98,6 +98,10 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -98,6 +98,10 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
List<DiadromousFish> deadFish = new ArrayList<DiadromousFish>(); List<DiadromousFish> deadFish = new ArrayList<DiadromousFish>();
for(RiverBasin riverBasin : group.getEnvironment().getRiverBasins()){ for(RiverBasin riverBasin : group.getEnvironment().getRiverBasins()){
// before the party !!!!
double fluxBefore =riverBasin.getSpawnerNumber();
double b, c, alpha, beta, amountPerSuperIndividual , S95, S50 ; double b, c, alpha, beta, amountPerSuperIndividual , S95, S50 ;
double numberOfFemaleGenitors = 0.; double numberOfFemaleGenitors = 0.;
double numberOfAutochtones = 0.; double numberOfAutochtones = 0.;
...@@ -402,16 +406,20 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -402,16 +406,20 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
group.removeAquaNism(fish); group.removeAquaNism(fish);
} }
deadFish.clear(); deadFish.clear();
// -------------------------------------------------------
// display information
// -----------------------------------------------------
if (displayFluxesOnConsole) if (displayFluxesOnConsole)
System.out.println(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot()) + ";IMPORT;" System.out.println(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot()) + ";IMPORT;"
+ riverBasin.getName() + ";" + riverBasin.getSpawnerNumber() + "; " + totalInputFluxes); + riverBasin.getName() + ";" + fluxBefore + ";" + riverBasin.getSpawnerNumberPerGroup(group)+ "; " + totalInputFluxes);
BufferedWriter bW = group.getbWForFluxes(); BufferedWriter bW = group.getbWForFluxes();
if ( bW != null) { if ( bW != null) {
try { try {
for (fluxOrigin origin : totalInputFluxes.keySet()) { for (fluxOrigin origin : totalInputFluxes.keySet()) {
bW.write(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot()) bW.write(group.getPilot().getCurrentTime() + "; " + Time.getYear(group.getPilot()) + ";" + Time.getSeason(group.getPilot())
+";"+ riverBasin.getName() + ";" + riverBasin.getSpawnerNumber() + ";" + "IMPORT"+ ";" + origin); +";"+ riverBasin.getName() + ";" + fluxBefore + ";" + "IMPORT"+ ";" + origin);
bW.write(";" + totalInputFluxes.get(origin).get("biomass")); bW.write(";" + totalInputFluxes.get(origin).get("biomass"));
for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) { for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) {
......
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