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

Abundance_Correction

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