Skip to content

Commit

Permalink
fixing r0 to be long not int.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreedpowers committed Oct 6, 2023
1 parent abc3f1d commit 785ff64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class RecruitmentBySpawningBiomass extends YearlyRecruitmentProcess {
/**
* the number of recruits you'd get in a "virgin" state.
*/
private final int virginRecruits;
private final long virginRecruits;

/**
* logistic growth parameter
Expand Down Expand Up @@ -67,7 +67,7 @@ public class RecruitmentBySpawningBiomass extends YearlyRecruitmentProcess {


public RecruitmentBySpawningBiomass(
final int virginRecruits,
final long virginRecruits,
final double steepness,
final double cumulativePhi, final boolean addRelativeFecundityToSpawningBiomass, final double[] maturity,
final double[] relativeFecundity, final int femaleSubdivision, final boolean recruitEveryDay
Expand Down Expand Up @@ -95,7 +95,7 @@ public RecruitmentBySpawningBiomass(


public RecruitmentBySpawningBiomass(
final int virginRecruits,
final long virginRecruits,
final double steepness,
final double cumulativePhi, final boolean addRelativeFecundityToSpawningBiomass,
final Function<Species, double[]> maturity,
Expand Down Expand Up @@ -193,7 +193,7 @@ public void addNoise(final NoiseMaker noiseMaker) {
*
* @return Value for property 'virginRecruits'.
*/
public int getVirginRecruits() {
public long getVirginRecruits() {
return virginRecruits;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class RecruitmentProcessesFactory
);
final float r0 = record.getFloat("R0");
return entry(species, new RecruitmentBySpawningBiomass(
Math.round(r0),
(long)r0,
record.getDouble("h_steepness"),
record.getDouble("virgin_ssb") / r0,
false,
Expand Down

0 comments on commit 785ff64

Please sign in to comment.