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
5c91dbc1
Commit
5c91dbc1
authored
Apr 04, 2020
by
Lambert Patrick
Browse files
without the problematic optimization of random number draw
parent
f99be320
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java
View file @
5c91dbc1
...
...
@@ -96,7 +96,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
@InitTransientParameters
public
void
initTransientParameters
(
Pilot
pilot
)
{
super
.
initTransientParameters
(
pilot
);
genNormal
=
new
Normal
ACR
Gen
(
pilot
.
getRandomStream
(),
genNormal
=
new
NormalGen
(
pilot
.
getRandomStream
(),
new
NormalDist
(
0
.,
1
.));
aleaGen
=
new
BinomialForSuperIndividualGen
(
pilot
.
getRandomStream
());
...
...
@@ -271,8 +271,8 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// survival after reproduction (semelparity or iteroparity) of SI (change the amount of the SI)
double
biomass
=
0
.;
survivalAmount
=
aleaGen
.
getSuccessNumber2
(
fish
.
getAmount
(),
survivalRateAfterReproduction
);
//
survivalAmount = aleaGen.getSuccessNumber2(fish.getAmount(), survivalRateAfterReproduction);
survivalAmount
=
Miscellaneous
.
binomialForSuperIndividual
(
group
.
getPilot
(),
fish
.
getAmount
(),
survivalRateAfterReproduction
);
// update the amount of fish or kill the fish if survival amount = 0
if
(
survivalAmount
>
0
)
{
// SUperindividu est encore vivant mais il perd des effectifs
...
...
@@ -311,7 +311,6 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
}
else
{
//Le superindividu est mort !!!
//deadFish.add(fish);
// --------------------------------------------------------------------------------------- nutrient routine -----------------------------
//Export for fished died after spawning (fish.getAmount): carcasses + excretion + gametes
...
...
@@ -327,6 +326,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// remove fish because fish is dead
fishIterator
.
remove
();
//deadFish.add(fish);
}
}
}
...
...
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