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
29bbded8
Commit
29bbded8
authored
Apr 03, 2020
by
Lambert Patrick
Browse files
use optimized function to draw random numbers
parent
708e4c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/species/DisperseAndMigrateToRiverWithMultiNomDistriAndDeathBasin.java
View file @
29bbded8
...
...
@@ -143,7 +143,7 @@ public class DisperseAndMigrateToRiverWithMultiNomDistriAndDeathBasin extends Di
if
(
fish
.
isMature
())
{
// fish with homing
//homingAmount = Miscellaneous.binomialForSuperIndividual(group.getPilot(), fish.getAmount(), pHoming); // seuil par d�faut fix� � 50
homingAmount
=
aleaGen
.
getSuccessNumber
(
fish
.
getAmount
(),
pHoming
);
homingAmount
=
aleaGen
.
getSuccessNumber
2
(
fish
.
getAmount
(),
pHoming
);
// strayed fish
if
(
killStrayers
==
true
&&
time
.
getYear
(
group
.
getPilot
())
>=
yearOfTheKillings
)
{
strayedAmount
=
0
;
...
...
@@ -186,7 +186,7 @@ public class DisperseAndMigrateToRiverWithMultiNomDistriAndDeathBasin extends Di
Double
weight
=
entry
.
getValue
();
probToGo
=
weight
/
totalWeight
;
//amountToGo = Miscellaneous.binomialForSuperIndividual(group.getPilot(), strayedAmount, probToGo);
amountToGo
=
aleaGen
.
getSuccessNumber
(
strayedAmount
,
probToGo
);
amountToGo
=
aleaGen
.
getSuccessNumber
2
(
strayedAmount
,
probToGo
);
if
(
amountToGo
>
0
)
{
strayerDestination
.
addFish
(
fish
.
duplicateWithNewPositionAndAmount
(
group
.
getPilot
(),
strayerDestination
,
amountToGo
),
group
);
}
...
...
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