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
ab9e1f6e
Commit
ab9e1f6e
authored
Apr 23, 2021
by
patrick.lambert
Browse files
correction for elegance
parent
28e2f6cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/species/ReproduceWithDiagnose.java
View file @
ab9e1f6e
...
...
@@ -25,7 +25,6 @@ import environment.Time.Season;
import
fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess
;
import
fr.cemagref.simaqualife.kernel.util.TransientParameters.InitTransientParameters
;
import
fr.cemagref.simaqualife.pilot.Pilot
;
import
miscellaneous.BinomialForSuperIndividualGen
;
import
miscellaneous.Miscellaneous
;
import
miscellaneous.Trio
;
import
species.DiadromousFish.Gender
;
...
...
@@ -83,12 +82,12 @@ public class ReproduceWithDiagnose extends AquaNismsGroupProcess<DiadromousFish,
private
transient
NormalGen
genNormal
;
/**
* the random numbers generator for binomial draws
*
* @unit --
*/
private
transient
BinomialForSuperIndividualGen
aleaGen
;
//
/**
//
* the random numbers generator for binomial draws
//
*
//
* @unit --
//
*/
//
private transient BinomialForSuperIndividualGen aleaGen;
private
transient
MortalityFunction
mortalityFunction
;
...
...
@@ -111,7 +110,7 @@ public class ReproduceWithDiagnose extends AquaNismsGroupProcess<DiadromousFish,
super
.
initTransientParameters
(
pilot
);
genNormal
=
new
NormalGen
(
pilot
.
getRandomStream
(),
new
NormalDist
(
0
.,
1
.));
aleaGen
=
new
BinomialForSuperIndividualGen
(
pilot
.
getRandomStream
());
//
aleaGen = new BinomialForSuperIndividualGen(pilot.getRandomStream());
mortalityFunction
=
new
MortalityFunction
();
stockRecruitmentRelationship
=
new
StockRecruitmentRelationship
();
...
...
@@ -205,11 +204,11 @@ public class ReproduceWithDiagnose extends AquaNismsGroupProcess<DiadromousFish,
amountPerSuperIndividual
=
alpha
/
maxNumberOfSuperIndividualPerReproduction
;
// Compute the Allee effect parameters S95 and S50
if
(
Soffset
>=
0
.)
{
// Allee effect independant of catchment size (including
if
(
Soffset
>=
0
.)
{
// Allee effect independant of catchment size (including
no Allee Effect)
S95
=
Soffset
;
S50
=
Soffset
;
}
else
{
S95
=
eta
*
riverBasin
.
getAccessibleSurface
();
// corresponds to S* in the rougier
publication
S95
=
eta
*
riverBasin
.
getAccessibleSurface
();
// corresponds to S* in the rougier
etal 2015
S50
=
S95
/
ratioS95_S50
;
}
// initilisation of the stock recruitment relationship
...
...
@@ -535,7 +534,7 @@ class StockRecruitmentRelationship implements UnivariateFunction {
// BH Stock-Recruitment relationship with logistic depensation
double
meanNumberOfRecruit
=
0
.;
double
effectiveStock
=
getEffectiveStock
(
stock
);
if
(
s
tock
>
0
)
if
(
effectiveS
tock
>
0
)
meanNumberOfRecruit
=
Math
.
round
(
alpha
*
effectiveStock
)
/
(
beta
+
effectiveStock
);
return
meanNumberOfRecruit
;
}
...
...
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