Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
31ba887c
Commit
31ba887c
authored
Sep 13, 2019
by
Poulet Camille
Browse files
Abundance_Correction
parent
c5661d58
Changes
5
Hide whitespace changes
Inline
Side-by-side
data/input/fishTryRealBV_CC.xml
View file @
31ba887c
...
...
@@ -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>
...
...
src/main/java/environment/RiverBasin.java
View file @
31ba887c
...
...
@@ -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
;
}
...
...
src/main/java/species/ExportBiomass.java
View file @
31ba887c
...
...
@@ -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
Export
Fluxe
s
()));
.
toXML
(
new
Export
Biomas
s
()));
}
/* (non-Javadoc)
...
...
src/main/java/species/ExportFluxes.java
View file @
31ba887c
...
...
@@ -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
();
...
...
src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java
View file @
31ba887c
...
...
@@ -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
.
getSpawnerNumber
PerGroup
(
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
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment