Commit ab9e1f6e authored by patrick.lambert's avatar patrick.lambert
Browse files

correction for elegance

parent 28e2f6cd
......@@ -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 (stock > 0)
if (effectiveStock > 0)
meanNumberOfRecruit = Math.round(alpha * effectiveStock) / (beta + effectiveStock);
return meanNumberOfRecruit;
}
......
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