Commit b01fefbf authored by Lambert Patrick's avatar Lambert Patrick
Browse files

buf fixed

Showing with 11 additions and 11 deletions
+11 -11
...@@ -114,9 +114,9 @@ public class NutrientRoutine { ...@@ -114,9 +114,9 @@ public class NutrientRoutine {
public NutrientRoutine() { public NutrientRoutine() {
} }
/** /**
* Constructor based on the 5 Map of fish composition * Constructor based on the 5 Map of fish composition
* @param fishFeaturesPreSpawning * @param fishFeaturesPreSpawning
...@@ -287,7 +287,7 @@ public class NutrientRoutine { ...@@ -287,7 +287,7 @@ public class NutrientRoutine {
public double getWeight (DiadromousFish fish, SpawningPosition spawningPosition) { public double getWeight (DiadromousFish fish, SpawningPosition spawningPosition) {
double weight = 0.; double weight = 0.;
if (fish.getStage()==Stage.IMMATURE) if (fish.getStage()==Stage.IMMATURE)
weight = juvenileFeatures.get("aLW") * Math.pow(fish.getLength(),juvenileFeatures.get("bLW")); weight = juvenileFeatures.get("aLW") * Math.pow(fish.getLength(),juvenileFeatures.get("bLW"));
else //Stage.MATURE else //Stage.MATURE
if (spawningPosition == SpawningPosition.PRE) if (spawningPosition == SpawningPosition.PRE)
...@@ -312,14 +312,14 @@ public class NutrientRoutine { ...@@ -312,14 +312,14 @@ public class NutrientRoutine {
public double getGonadWeight (DiadromousFish fish, SpawningPosition spawningPosition) { public double getGonadWeight (DiadromousFish fish, SpawningPosition spawningPosition) {
double gonadWeight = 0.; double gonadWeight = 0.;
if (fish.getStage()==Stage.MATURE); if (fish.getStage()==Stage.MATURE) {
if (spawningPosition == SpawningPosition.PRE) if (spawningPosition == SpawningPosition.PRE)
gonadWeight = Math.exp(fishFeaturesPreSpawning.get(fish.getGender()).get("aLW_Gonad") gonadWeight = Math.exp(fishFeaturesPreSpawning.get(fish.getGender()).get("aLW_Gonad")
+ fishFeaturesPreSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength())); + fishFeaturesPreSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength()));
else else
gonadWeight = Math.exp(fishFeaturesPostSpawning.get(fish.getGender()).get("aLW_Gonad") gonadWeight = Math.exp(fishFeaturesPostSpawning.get(fish.getGender()).get("aLW_Gonad")
+ fishFeaturesPostSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength())); + fishFeaturesPostSpawning.get(fish.getGender()).get("bLW_Gonad") * Math.log(fish.getLength()));
}
return gonadWeight; return gonadWeight;
} }
......
Supports Markdown
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